mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix: filter out nzbs with failed status
This commit is contained in:
@@ -426,6 +426,13 @@ async function processNZBsForDebridService(
|
||||
const nzbCheckResult = nzbCheckResults.find(
|
||||
(result) => result.hash === nzb.hash
|
||||
);
|
||||
if (nzbCheckResult?.status === 'failed') {
|
||||
logger.debug(`Skipping NZB as its status is failed`, {
|
||||
service: service.id,
|
||||
nzb: nzb.title,
|
||||
});
|
||||
continue;
|
||||
}
|
||||
const parsedNzb = parsedTitlesMap.get(nzb.title ?? '');
|
||||
if (metadata && parsedNzb) {
|
||||
if (isSeasonWrong(parsedNzb, metadata)) {
|
||||
|
||||
@@ -619,7 +619,7 @@ export abstract class UsenetStreamService implements DebridService {
|
||||
const history = await this.api.history();
|
||||
const nzbs: DebridDownload[] = history.slots.map((slot, index) => ({
|
||||
id: index,
|
||||
status: 'cached' as const,
|
||||
status: slot.status !== 'failed' ? 'cached' : 'failed',
|
||||
name: slot.name,
|
||||
}));
|
||||
this.serviceLogger.debug(`Listed NZBs from history`, {
|
||||
@@ -679,7 +679,7 @@ export abstract class UsenetStreamService implements DebridService {
|
||||
);
|
||||
return {
|
||||
id: index,
|
||||
status: 'cached',
|
||||
status: libraryNzb?.status === 'failed' ? 'failed' : 'cached',
|
||||
library: !!libraryNzb,
|
||||
hash: h,
|
||||
name: n,
|
||||
|
||||
Reference in New Issue
Block a user