[addon] add option to not show debrid catalog

This commit is contained in:
TheBeastLT
2021-02-07 10:47:48 +01:00
parent f49786d9c2
commit 63ffa653a5
2 changed files with 13 additions and 3 deletions

View File

@@ -5,6 +5,10 @@ const DebridOptions = {
key: 'nodownloadlinks',
description: 'Don\'t show download to debrid links'
},
noCatalog: {
key: 'nocatalog',
description: 'Don\'t show debrid catalog'
},
torrentLinks: {
key: 'torrentlinks',
description: 'Show P2P torrent links for uncached'
@@ -22,4 +26,9 @@ function includeTorrentLinks(config) {
.includes(DebridOptions.options.torrentLinks.key);
}
module.exports = { DebridOptions, excludeDownloadLinks, includeTorrentLinks }
function showDebridCatalog(config) {
return !(config[DebridOptions.key] && config[DebridOptions.key]
.includes(DebridOptions.options.noCatalog.key));
}
module.exports = { DebridOptions, excludeDownloadLinks, showDebridCatalog, includeTorrentLinks }