mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-01-11 22:40:22 +00:00
remove p2p debrid option
This commit is contained in:
parent
d74d62eeb9
commit
4b57ca4cad
2 changed files with 1 additions and 10 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue