feat: allow non-admin users to blocklist & search under specific conditions
- Added addedOn timestamp to qBittorrent torrent mapping - Added canBlocklist helper function: true for admins, true for non-admins when (importIssues OR (torrent >1h old AND availability<100%)) - Added canBlocklist field to all download objects in /user-downloads and SSE /stream routes (8 blocks total) - Frontend button now shows when (isAdmin OR download.canBlocklist) && download.arrQueueId
This commit is contained in:
@@ -556,7 +556,7 @@ function createDownloadCard(download) {
|
||||
header.appendChild(issueBadge);
|
||||
}
|
||||
|
||||
if (isAdmin && download.arrQueueId) {
|
||||
if ((isAdmin || download.canBlocklist) && download.arrQueueId) {
|
||||
const blBtn = document.createElement('button');
|
||||
blBtn.className = 'blocklist-search-btn';
|
||||
blBtn.textContent = '⛔ Blocklist & Search';
|
||||
|
||||
Reference in New Issue
Block a user