try to handle common debrid error for catalog retrieval

This commit is contained in:
TheBeastLT
2023-10-31 22:26:26 +02:00
parent 8a2f0093c6
commit 25313192d2
9 changed files with 73 additions and 23 deletions

View File

@@ -3,6 +3,7 @@ import { isVideo } from '../lib/extension.js';
import { delay } from '../lib/promises.js';
import StaticResponse from './static.js';
import { getMagnetLink } from '../lib/magnetHelper.js';
import { BadTokenError } from "./mochHelper.js";
export async function getCachedStreams(streams, apiKey) {
return streams
@@ -140,6 +141,10 @@ async function _getPublicToken(Putio, targetVideoId) {
return Putio.File.CreatePublicLink(targetVideoId).then(response => response.data.token);
}
export function toCommonError(error) {
return undefined;
}
function statusError(status) {
return ['ERROR'].includes(status);
}