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:
@@ -204,6 +204,7 @@ function mapTorrentToDownload(torrent) {
|
||||
category: torrent.category,
|
||||
tags: torrent.tags,
|
||||
savePath: torrent.content_path || torrent.save_path || null,
|
||||
addedOn: torrent.added_on || null,
|
||||
qbittorrent: true
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user