mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
const DebridOptions = {
|
|
key: 'debridoptions',
|
|
options: {
|
|
onlyCached: {
|
|
key: 'onlycached',
|
|
description: 'Show only cached debrid links'
|
|
},
|
|
onlyCachedIfAvailable: {
|
|
key: 'onlycachedifavailable',
|
|
description: 'Show only cached debrid links if available'
|
|
},
|
|
downloadLinks: {
|
|
key: 'downloadlinks',
|
|
description: 'Show download to debrid links for uncached'
|
|
}
|
|
}
|
|
}
|
|
|
|
function onlyCachedLinks(config) {
|
|
return config[DebridOptions.key] && config[DebridOptions.key]
|
|
.includes(DebridOptions.options.onlyCached.key);
|
|
}
|
|
|
|
function onlyCachedLinksIfAvailable(config) {
|
|
return config[DebridOptions.key] && config[DebridOptions.key]
|
|
.includes(DebridOptions.options.onlyCachedIfAvailable.key);
|
|
}
|
|
|
|
function includeDownloadLinks(config) {
|
|
return config[DebridOptions.key] && config[DebridOptions.key]
|
|
.includes(DebridOptions.options.downloadLinks.key);
|
|
}
|
|
|
|
module.exports = { DebridOptions, onlyCachedLinks, onlyCachedLinksIfAvailable, includeDownloadLinks } |