feat: show blocklist & search button on all admin downloads (not just import-pending)
- Remove importIssues condition from arr action fields threading in /user-downloads route (all 4 blocks: SAB+Sonarr, SAB+Radarr, qBit+Sonarr, qBit+Radarr) - Remove importIssues condition from arr action fields threading in SSE /stream route (all 4 blocks) - Move blocklist button rendering outside importIssues condition in frontend — now shows for all admin downloads with arrQueueId
This commit is contained in:
+8
-8
@@ -554,15 +554,15 @@ function createDownloadCard(download) {
|
|||||||
issueBadge.textContent = 'Import Pending';
|
issueBadge.textContent = 'Import Pending';
|
||||||
issueBadge.setAttribute('data-tooltip', download.importIssues.join('\n'));
|
issueBadge.setAttribute('data-tooltip', download.importIssues.join('\n'));
|
||||||
header.appendChild(issueBadge);
|
header.appendChild(issueBadge);
|
||||||
|
}
|
||||||
|
|
||||||
if (isAdmin && download.arrQueueId) {
|
if (isAdmin && download.arrQueueId) {
|
||||||
const blBtn = document.createElement('button');
|
const blBtn = document.createElement('button');
|
||||||
blBtn.className = 'blocklist-search-btn';
|
blBtn.className = 'blocklist-search-btn';
|
||||||
blBtn.textContent = '⛔ Blocklist & Search';
|
blBtn.textContent = '⛔ Blocklist & Search';
|
||||||
blBtn.title = 'Remove this release from the download client, add it to the blocklist, and trigger a new automatic search';
|
blBtn.title = 'Remove this release from the download client, add it to the blocklist, and trigger a new automatic search';
|
||||||
blBtn.addEventListener('click', () => handleBlocklistSearch(blBtn, download));
|
blBtn.addEventListener('click', () => handleBlocklistSearch(blBtn, download));
|
||||||
header.appendChild(blBtn);
|
header.appendChild(blBtn);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = document.createElement('h3');
|
const title = document.createElement('h3');
|
||||||
|
|||||||
+28
-36
@@ -321,14 +321,12 @@ router.get('/user-downloads', requireAuth, async (req, res) => {
|
|||||||
dlObj.downloadPath = slot.storage || null;
|
dlObj.downloadPath = slot.storage || null;
|
||||||
dlObj.targetPath = series.path || null;
|
dlObj.targetPath = series.path || null;
|
||||||
dlObj.arrLink = getSonarrLink(series);
|
dlObj.arrLink = getSonarrLink(series);
|
||||||
if (issues) {
|
dlObj.arrQueueId = sonarrMatch.id;
|
||||||
dlObj.arrQueueId = sonarrMatch.id;
|
dlObj.arrType = 'sonarr';
|
||||||
dlObj.arrType = 'sonarr';
|
dlObj.arrInstanceUrl = sonarrMatch._instanceUrl || null;
|
||||||
dlObj.arrInstanceUrl = sonarrMatch._instanceUrl || null;
|
dlObj.arrInstanceKey = sonarrMatch._instanceKey || null;
|
||||||
dlObj.arrInstanceKey = sonarrMatch._instanceKey || null;
|
dlObj.arrContentId = sonarrMatch.episodeId || null;
|
||||||
dlObj.arrContentId = sonarrMatch.episodeId || null;
|
dlObj.arrContentType = 'episode';
|
||||||
dlObj.arrContentType = 'episode';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
userDownloads.push(dlObj);
|
userDownloads.push(dlObj);
|
||||||
}
|
}
|
||||||
@@ -371,14 +369,12 @@ router.get('/user-downloads', requireAuth, async (req, res) => {
|
|||||||
dlObj.downloadPath = slot.storage || null;
|
dlObj.downloadPath = slot.storage || null;
|
||||||
dlObj.targetPath = movie.path || null;
|
dlObj.targetPath = movie.path || null;
|
||||||
dlObj.arrLink = getRadarrLink(movie);
|
dlObj.arrLink = getRadarrLink(movie);
|
||||||
if (issues) {
|
dlObj.arrQueueId = radarrMatch.id;
|
||||||
dlObj.arrQueueId = radarrMatch.id;
|
dlObj.arrType = 'radarr';
|
||||||
dlObj.arrType = 'radarr';
|
dlObj.arrInstanceUrl = radarrMatch._instanceUrl || null;
|
||||||
dlObj.arrInstanceUrl = radarrMatch._instanceUrl || null;
|
dlObj.arrInstanceKey = radarrMatch._instanceKey || null;
|
||||||
dlObj.arrInstanceKey = radarrMatch._instanceKey || null;
|
dlObj.arrContentId = radarrMatch.movieId || null;
|
||||||
dlObj.arrContentId = radarrMatch.movieId || null;
|
dlObj.arrContentType = 'movie';
|
||||||
dlObj.arrContentType = 'movie';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
userDownloads.push(dlObj);
|
userDownloads.push(dlObj);
|
||||||
}
|
}
|
||||||
@@ -536,14 +532,12 @@ router.get('/user-downloads', requireAuth, async (req, res) => {
|
|||||||
download.downloadPath = download.savePath || null;
|
download.downloadPath = download.savePath || null;
|
||||||
download.targetPath = series.path || null;
|
download.targetPath = series.path || null;
|
||||||
download.arrLink = getSonarrLink(series);
|
download.arrLink = getSonarrLink(series);
|
||||||
if (sonarrIssues) {
|
download.arrQueueId = sonarrMatch.id;
|
||||||
download.arrQueueId = sonarrMatch.id;
|
download.arrType = 'sonarr';
|
||||||
download.arrType = 'sonarr';
|
download.arrInstanceUrl = sonarrMatch._instanceUrl || null;
|
||||||
download.arrInstanceUrl = sonarrMatch._instanceUrl || null;
|
download.arrInstanceKey = sonarrMatch._instanceKey || null;
|
||||||
download.arrInstanceKey = sonarrMatch._instanceKey || null;
|
download.arrContentId = sonarrMatch.episodeId || null;
|
||||||
download.arrContentId = sonarrMatch.episodeId || null;
|
download.arrContentType = 'episode';
|
||||||
download.arrContentType = 'episode';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
userDownloads.push(download);
|
userDownloads.push(download);
|
||||||
continue; // Skip to next torrent
|
continue; // Skip to next torrent
|
||||||
@@ -579,14 +573,12 @@ router.get('/user-downloads', requireAuth, async (req, res) => {
|
|||||||
download.downloadPath = download.savePath || null;
|
download.downloadPath = download.savePath || null;
|
||||||
download.targetPath = movie.path || null;
|
download.targetPath = movie.path || null;
|
||||||
download.arrLink = getRadarrLink(movie);
|
download.arrLink = getRadarrLink(movie);
|
||||||
if (radarrIssues) {
|
download.arrQueueId = radarrMatch.id;
|
||||||
download.arrQueueId = radarrMatch.id;
|
download.arrType = 'radarr';
|
||||||
download.arrType = 'radarr';
|
download.arrInstanceUrl = radarrMatch._instanceUrl || null;
|
||||||
download.arrInstanceUrl = radarrMatch._instanceUrl || null;
|
download.arrInstanceKey = radarrMatch._instanceKey || null;
|
||||||
download.arrInstanceKey = radarrMatch._instanceKey || null;
|
download.arrContentId = radarrMatch.movieId || null;
|
||||||
download.arrContentId = radarrMatch.movieId || null;
|
download.arrContentType = 'movie';
|
||||||
download.arrContentType = 'movie';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
userDownloads.push(download);
|
userDownloads.push(download);
|
||||||
continue; // Skip to next torrent
|
continue; // Skip to next torrent
|
||||||
@@ -925,7 +917,7 @@ router.get('/stream', requireAuth, async (req, res) => {
|
|||||||
const dlObj = { type: 'series', title: nzbName, coverArt: getCoverArt(series), status: slotState.status, progress: slot.percentage, mb: slot.mb, mbmissing: slot.mbmissing, size: slot.size, speed: slotState.speed, eta: slot.timeleft, seriesName: series.title, episodes: gatherEpisodes(nzbNameLower, sonarrQueue.data.records), allTags, matchedUserTag: matchedUserTag || null, tagBadges: showAll ? buildTagBadges(allTags, embyUserMap) : undefined };
|
const dlObj = { type: 'series', title: nzbName, coverArt: getCoverArt(series), status: slotState.status, progress: slot.percentage, mb: slot.mb, mbmissing: slot.mbmissing, size: slot.size, speed: slotState.speed, eta: slot.timeleft, seriesName: series.title, episodes: gatherEpisodes(nzbNameLower, sonarrQueue.data.records), allTags, matchedUserTag: matchedUserTag || null, tagBadges: showAll ? buildTagBadges(allTags, embyUserMap) : undefined };
|
||||||
const issues = getImportIssues(sonarrMatch);
|
const issues = getImportIssues(sonarrMatch);
|
||||||
if (issues) dlObj.importIssues = issues;
|
if (issues) dlObj.importIssues = issues;
|
||||||
if (isAdmin) { dlObj.downloadPath = slot.storage || null; dlObj.targetPath = series.path || null; dlObj.arrLink = getSonarrLink(series); if (issues) { dlObj.arrQueueId = sonarrMatch.id; dlObj.arrType = 'sonarr'; dlObj.arrInstanceUrl = sonarrMatch._instanceUrl || null; dlObj.arrInstanceKey = sonarrMatch._instanceKey || null; dlObj.arrContentId = sonarrMatch.episodeId || null; dlObj.arrContentType = 'episode'; } }
|
if (isAdmin) { dlObj.downloadPath = slot.storage || null; dlObj.targetPath = series.path || null; dlObj.arrLink = getSonarrLink(series); dlObj.arrQueueId = sonarrMatch.id; dlObj.arrType = 'sonarr'; dlObj.arrInstanceUrl = sonarrMatch._instanceUrl || null; dlObj.arrInstanceKey = sonarrMatch._instanceKey || null; dlObj.arrContentId = sonarrMatch.episodeId || null; dlObj.arrContentType = 'episode'; }
|
||||||
userDownloads.push(dlObj);
|
userDownloads.push(dlObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -944,7 +936,7 @@ router.get('/stream', requireAuth, async (req, res) => {
|
|||||||
const dlObj = { type: 'movie', title: nzbName, coverArt: getCoverArt(movie), status: slotState.status, progress: slot.percentage, mb: slot.mb, mbmissing: slot.mbmissing, size: slot.size, speed: slotState.speed, eta: slot.timeleft, movieName: movie.title, movieInfo: radarrMatch, allTags, matchedUserTag: matchedUserTag || null, tagBadges: showAll ? buildTagBadges(allTags, embyUserMap) : undefined };
|
const dlObj = { type: 'movie', title: nzbName, coverArt: getCoverArt(movie), status: slotState.status, progress: slot.percentage, mb: slot.mb, mbmissing: slot.mbmissing, size: slot.size, speed: slotState.speed, eta: slot.timeleft, movieName: movie.title, movieInfo: radarrMatch, allTags, matchedUserTag: matchedUserTag || null, tagBadges: showAll ? buildTagBadges(allTags, embyUserMap) : undefined };
|
||||||
const issues = getImportIssues(radarrMatch);
|
const issues = getImportIssues(radarrMatch);
|
||||||
if (issues) dlObj.importIssues = issues;
|
if (issues) dlObj.importIssues = issues;
|
||||||
if (isAdmin) { dlObj.downloadPath = slot.storage || null; dlObj.targetPath = movie.path || null; dlObj.arrLink = getRadarrLink(movie); if (issues) { dlObj.arrQueueId = radarrMatch.id; dlObj.arrType = 'radarr'; dlObj.arrInstanceUrl = radarrMatch._instanceUrl || null; dlObj.arrInstanceKey = radarrMatch._instanceKey || null; dlObj.arrContentId = radarrMatch.movieId || null; dlObj.arrContentType = 'movie'; } }
|
if (isAdmin) { dlObj.downloadPath = slot.storage || null; dlObj.targetPath = movie.path || null; dlObj.arrLink = getRadarrLink(movie); dlObj.arrQueueId = radarrMatch.id; dlObj.arrType = 'radarr'; dlObj.arrInstanceUrl = radarrMatch._instanceUrl || null; dlObj.arrInstanceKey = radarrMatch._instanceKey || null; dlObj.arrContentId = radarrMatch.movieId || null; dlObj.arrContentType = 'movie'; }
|
||||||
userDownloads.push(dlObj);
|
userDownloads.push(dlObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1011,7 +1003,7 @@ router.get('/stream', requireAuth, async (req, res) => {
|
|||||||
const download = mapTorrentToDownload(torrent);
|
const download = mapTorrentToDownload(torrent);
|
||||||
Object.assign(download, { type: 'series', coverArt: getCoverArt(series), seriesName: series.title, episodes: gatherEpisodes(torrentNameLower, sonarrQueue.data.records), allTags, matchedUserTag: matchedUserTag || null, tagBadges: showAll ? buildTagBadges(allTags, embyUserMap) : undefined });
|
Object.assign(download, { type: 'series', coverArt: getCoverArt(series), seriesName: series.title, episodes: gatherEpisodes(torrentNameLower, sonarrQueue.data.records), allTags, matchedUserTag: matchedUserTag || null, tagBadges: showAll ? buildTagBadges(allTags, embyUserMap) : undefined });
|
||||||
const issues = getImportIssues(sonarrMatch); if (issues) download.importIssues = issues;
|
const issues = getImportIssues(sonarrMatch); if (issues) download.importIssues = issues;
|
||||||
if (isAdmin) { download.downloadPath = download.savePath || null; download.targetPath = series.path || null; download.arrLink = getSonarrLink(series); if (issues) { download.arrQueueId = sonarrMatch.id; download.arrType = 'sonarr'; download.arrInstanceUrl = sonarrMatch._instanceUrl || null; download.arrInstanceKey = sonarrMatch._instanceKey || null; download.arrContentId = sonarrMatch.episodeId || null; download.arrContentType = 'episode'; } }
|
if (isAdmin) { download.downloadPath = download.savePath || null; download.targetPath = series.path || null; download.arrLink = getSonarrLink(series); download.arrQueueId = sonarrMatch.id; download.arrType = 'sonarr'; download.arrInstanceUrl = sonarrMatch._instanceUrl || null; download.arrInstanceKey = sonarrMatch._instanceKey || null; download.arrContentId = sonarrMatch.episodeId || null; download.arrContentType = 'episode'; }
|
||||||
userDownloads.push(download); continue;
|
userDownloads.push(download); continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1027,7 +1019,7 @@ router.get('/stream', requireAuth, async (req, res) => {
|
|||||||
const download = mapTorrentToDownload(torrent);
|
const download = mapTorrentToDownload(torrent);
|
||||||
Object.assign(download, { type: 'movie', coverArt: getCoverArt(movie), movieName: movie.title, movieInfo: radarrMatch, allTags, matchedUserTag: matchedUserTag || null, tagBadges: showAll ? buildTagBadges(allTags, embyUserMap) : undefined });
|
Object.assign(download, { type: 'movie', coverArt: getCoverArt(movie), movieName: movie.title, movieInfo: radarrMatch, allTags, matchedUserTag: matchedUserTag || null, tagBadges: showAll ? buildTagBadges(allTags, embyUserMap) : undefined });
|
||||||
const issues = getImportIssues(radarrMatch); if (issues) download.importIssues = issues;
|
const issues = getImportIssues(radarrMatch); if (issues) download.importIssues = issues;
|
||||||
if (isAdmin) { download.downloadPath = download.savePath || null; download.targetPath = movie.path || null; download.arrLink = getRadarrLink(movie); if (issues) { download.arrQueueId = radarrMatch.id; download.arrType = 'radarr'; download.arrInstanceUrl = radarrMatch._instanceUrl || null; download.arrInstanceKey = radarrMatch._instanceKey || null; download.arrContentId = radarrMatch.movieId || null; download.arrContentType = 'movie'; } }
|
if (isAdmin) { download.downloadPath = download.savePath || null; download.targetPath = movie.path || null; download.arrLink = getRadarrLink(movie); download.arrQueueId = radarrMatch.id; download.arrType = 'radarr'; download.arrInstanceUrl = radarrMatch._instanceUrl || null; download.arrInstanceKey = radarrMatch._instanceKey || null; download.arrContentId = radarrMatch.movieId || null; download.arrContentType = 'movie'; }
|
||||||
userDownloads.push(download); continue;
|
userDownloads.push(download); continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user