migrate to esm structure

This commit is contained in:
TheBeastLT
2023-10-31 14:21:04 +02:00
parent c7fa8e9c50
commit 86cf502725
30 changed files with 242 additions and 311 deletions

View File

@@ -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 }