Skip to content

Commit

Permalink
Disable some Debug Logs
Browse files Browse the repository at this point in the history
  • Loading branch information
asaddon committed Dec 26, 2024
1 parent 2159f57 commit c62a0f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async function verifyImdbTitle(title, year) {
if (inputFirstWord === fetchedFirstWord ||
(isNaN(inputFirstWord) && isNaN(fetchedFirstWord) && inputFirstWord.toLowerCase().startsWith(fetchedFirstWord)) ||
(inputFirstWord.toLowerCase() === fetchedFirstWord.toLowerCase())) {
console.warn(`Relaxed Match: The title "${title}" does not perfectly match the fetched title "${fetchedTitle}" but the first words align based on starting letter. Accepting as a match.`);
//console.warn(`Relaxed Match: The title "${title}" does not perfectly match the fetched title "${fetchedTitle}" but the first words align based on starting letter. Accepting as a match.`);
return imdbId;// Adjusted to reject false positives more effectively
}

Expand Down Expand Up @@ -209,7 +209,7 @@ async function getImdbId(title, year) {
cache.set(cacheKey, compressData(result));
return result; // Return the result immediately after caching
}
console.warn(`${useColors ? '\x1b[33m' : ''}IMDB ID Not Found For Cleaned Title: ${useColors ? '\x1b[0m' : ''}${useColors ? '\x1b[36m' : ''}"${cleanedTitle}"${useColors ? '\x1b[0m' : ''}${cleanedTitle !== title ? `${useColors ? '\x1b[33m' : ''} Original Title: ${useColors ? '\x1b[36m' : ''}"${title}"${useColors ? '\x1b[0m' : ''}` : ''}${year ? ` ${useColors ? '\x1b[33m' : ''}(${year})${useColors ? '\x1b[0m' : ''}` : ''}`);
//console.warn(`${useColors ? '\x1b[33m' : ''}IMDB ID Not Found For Cleaned Title: ${useColors ? '\x1b[0m' : ''}${useColors ? '\x1b[36m' : ''}"${cleanedTitle}"${useColors ? '\x1b[0m' : ''}${cleanedTitle !== title ? `${useColors ? '\x1b[33m' : ''} Original Title: ${useColors ? '\x1b[36m' : ''}"${title}"${useColors ? '\x1b[0m' : ''}` : ''}${year ? ` ${useColors ? '\x1b[33m' : ''}(${year})${useColors ? '\x1b[0m' : ''}` : ''}`);
return null;
} catch (err) {
console.error(`Error Fetching IMDb ID For "${cleanedTitle}":`, err.message);
Expand Down

0 comments on commit c62a0f7

Please sign in to comment.