Add client-side logging to blocklist button for debugging
Build and Push Docker Image / build (push) Successful in 53s
CI / Tests & coverage (push) Has been cancelled
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m23s
CI / Security audit (push) Has been cancelled

- 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:
2026-05-21 02:15:09 +01:00
parent 251c10f08c
commit bb10cd4aef
+13 -1
View File
@@ -223,6 +223,18 @@ export function updateDownloadCard(card, 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;
btn.disabled = true;
@@ -240,7 +252,7 @@ export async function handleBlocklistSearchClick(btn, download) {
btn.title = `Failed: ${err.message}`;
setTimeout(() => {
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);
}
}