Add client-side logging to blocklist button for debugging
- Log download object and required fields when button is clicked - Shows which fields are present/absent to diagnose blocklist issues
This commit is contained in:
@@ -223,6 +223,18 @@ export function updateDownloadCard(card, download) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function handleBlocklistSearchClick(btn, download) {
|
export async function handleBlocklistSearchClick(btn, download) {
|
||||||
|
console.log('[Blocklist] Clicked, download:', download);
|
||||||
|
console.log('[Blocklist] Required fields:', {
|
||||||
|
arrQueueId: download.arrQueueId,
|
||||||
|
arrType: download.arrType,
|
||||||
|
arrInstanceUrl: download.arrInstanceUrl,
|
||||||
|
arrInstanceKey: download.arrInstanceKey,
|
||||||
|
arrContentId: download.arrContentId,
|
||||||
|
arrContentType: download.arrContentType,
|
||||||
|
isAdmin: state.isAdmin,
|
||||||
|
canBlocklist: download.canBlocklist
|
||||||
|
});
|
||||||
|
|
||||||
if (!confirm(`Blocklist "${download.title}" and trigger a new search?\n\nThis will:\n• Remove the download from the download client\n• Add this release to the blocklist\n• Trigger an automatic search for a new release`)) return;
|
if (!confirm(`Blocklist "${download.title}" and trigger a new search?\n\nThis will:\n• Remove the download from the download client\n• Add this release to the blocklist\n• Trigger an automatic search for a new release`)) return;
|
||||||
|
|
||||||
btn.disabled = true;
|
btn.disabled = true;
|
||||||
@@ -240,7 +252,7 @@ export async function handleBlocklistSearchClick(btn, download) {
|
|||||||
btn.title = `Failed: ${err.message}`;
|
btn.title = `Failed: ${err.message}`;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
btn.className = 'blocklist-search-btn';
|
btn.className = 'blocklist-search-btn';
|
||||||
btn.title = 'Remove this release from the download client, add it to the blocklist, and trigger a new automatic search';
|
btn.title = 'Remove this release from the download client, add it to the blocklist, and trigger an automatic search';
|
||||||
}, 4000);
|
}, 4000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user