fix: remove debug logging and adjust builtin torbox search logs

This commit is contained in:
Viren070
2025-08-13 21:32:18 +01:00
parent 7b0b98f135
commit 2a027ca49b
2 changed files with 13 additions and 10 deletions
@@ -86,9 +86,9 @@ export class DebridService {
let newResults: DebridFile[] = [];
const start = Date.now();
if (torrentsToCheck.length > 0) {
try {
const start = Date.now();
const instantAvailability = await this.debridInterface.checkMagnets(
torrentsToCheck.map((t) => t.hash),
id
@@ -148,9 +148,9 @@ export class DebridService {
);
}
}
logger.info(
`[${this.serviceConfig.id}] Checked ${torrentsToCheck.length} uncached magnets in ${getTimeTakenSincePoint(start)}`
);
// logger.info(
// `[${this.serviceConfig.id}] Checked ${torrentsToCheck.length} uncached magnets in ${getTimeTakenSincePoint(start)}`
// );
} catch (error) {
if (error instanceof StremThruError) {
logger.error(
@@ -181,6 +181,15 @@ export class DebridService {
}
}
// count number of cached results
const cachedCount = [...cachedResults, ...newResults].filter(
(result) => result.service.cached
).length;
logger.debug(
`[${this.serviceConfig.id}] Checked ${torrents.length} magnets in ${getTimeTakenSincePoint(start)}. ${cachedCount} / ${torrents.length} cached`
);
return [...cachedResults, ...newResults];
}
}
-6
View File
@@ -58,9 +58,6 @@ export function findMatchingFileInTorrent(
(title) => file.parsed.title?.toLowerCase() === title.toLowerCase()
)
) {
console.log(
`Choosing file based on requested title match: ${file.name}`
);
chosenFile = file;
break;
}
@@ -77,9 +74,6 @@ export function findMatchingFileInTorrent(
(file) => file.name.toLowerCase() === requestedFilename.toLowerCase()
);
if (requestedFile) {
console.log(
`Choosing file based on requested filename match: ${requestedFile.name}`
);
return requestedFile;
}
}