remove p2p debrid option

This commit is contained in:
TheBeastLT 2024-11-26 14:08:44 +02:00
parent d74d62eeb9
commit 4b57ca4cad
2 changed files with 1 additions and 10 deletions

View file

@ -164,14 +164,13 @@ function processMochResults(streams, config, results) {
return errorResults;
}
const includeTorrentLinks = options.includeTorrentLinks(config);
const excludeDownloadLinks = options.excludeDownloadLinks(config);
const mochResults = results.filter(result => result?.mochStreams);
const cachedStreams = mochResults
.reduce((resultStreams, mochResult) => populateCachedLinks(resultStreams, mochResult, config), streams);
const resultStreams = excludeDownloadLinks ? cachedStreams : populateDownloadLinks(cachedStreams, mochResults, config);
return includeTorrentLinks ? resultStreams : resultStreams.filter(stream => stream.url);
return resultStreams.filter(stream => stream.url);
}
function populateCachedLinks(streams, mochResult, config) {

View file

@ -9,10 +9,6 @@ export const DebridOptions = {
key: 'nocatalog',
description: 'Don\'t show debrid catalog'
},
torrentLinks: {
key: 'torrentlinks',
description: 'Show P2P torrent links for uncached'
}
}
}
@ -20,10 +16,6 @@ export function excludeDownloadLinks(config) {
return config[DebridOptions.key]?.includes(DebridOptions.options.noDownloadLinks.key);
}
export function includeTorrentLinks(config) {
return config[DebridOptions.key]?.includes(DebridOptions.options.torrentLinks.key);
}
export function showDebridCatalog(config) {
return !config[DebridOptions.key]?.includes(DebridOptions.options.noCatalog.key);
}