mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix: remove debug logging and adjust builtin torbox search logs
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user