Files
knightcrawler/addon/moch/options.js
2021-02-01 00:25:07 +01:00

25 lines
703 B
JavaScript

const DebridOptions = {
key: 'debridoptions',
options: {
noDownloadLinks: {
key: 'nodownloadlinks',
description: 'Don\'t show download to debrid links'
},
torrentLinks: {
key: 'torrentlinks',
description: 'Show P2P torrent links for uncached'
}
}
}
function excludeDownloadLinks(config) {
return config[DebridOptions.key] && config[DebridOptions.key]
.includes(DebridOptions.options.noDownloadLinks.key);
}
function includeTorrentLinks(config) {
return config[DebridOptions.key] && config[DebridOptions.key]
.includes(DebridOptions.options.torrentLinks.key);
}
module.exports = { DebridOptions, excludeDownloadLinks, includeTorrentLinks }