mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
migrate to esm structure
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const DebridOptions = {
|
||||
export const DebridOptions = {
|
||||
key: 'debridoptions',
|
||||
options: {
|
||||
noDownloadLinks: {
|
||||
@@ -16,19 +16,14 @@ const DebridOptions = {
|
||||
}
|
||||
}
|
||||
|
||||
function excludeDownloadLinks(config) {
|
||||
return config[DebridOptions.key] && config[DebridOptions.key]
|
||||
.includes(DebridOptions.options.noDownloadLinks.key);
|
||||
export function excludeDownloadLinks(config) {
|
||||
return config[DebridOptions.key]?.includes(DebridOptions.options.noDownloadLinks.key);
|
||||
}
|
||||
|
||||
function includeTorrentLinks(config) {
|
||||
return config[DebridOptions.key] && config[DebridOptions.key]
|
||||
.includes(DebridOptions.options.torrentLinks.key);
|
||||
export function includeTorrentLinks(config) {
|
||||
return config[DebridOptions.key]?.includes(DebridOptions.options.torrentLinks.key);
|
||||
}
|
||||
|
||||
function showDebridCatalog(config) {
|
||||
return !(config[DebridOptions.key] && config[DebridOptions.key]
|
||||
.includes(DebridOptions.options.noCatalog.key));
|
||||
export function showDebridCatalog(config) {
|
||||
return !config[DebridOptions.key]?.includes(DebridOptions.options.noCatalog.key);
|
||||
}
|
||||
|
||||
module.exports = { DebridOptions, excludeDownloadLinks, showDebridCatalog, includeTorrentLinks }
|
||||
Reference in New Issue
Block a user