zoechip - dont pass year when searching shows

This commit is contained in:
Jonathan Barrow
2023-09-28 18:29:00 -04:00
parent 610aee16df
commit dd168c7458

View File

@@ -83,8 +83,7 @@ export async function getZoeChipShowID(ctx: ScrapeContext, media: ShowMedia): Pr
const releasedRegex = /<\/strong><\/span> (\d.*)-\d.*-\d.*/; const releasedRegex = /<\/strong><\/span> (\d.*)-\d.*-\d.*/;
const searchResults = await getZoeChipSearchResults(ctx, media); const searchResults = await getZoeChipSearchResults(ctx, media);
// Since we don't have a year here, force them to be the same. Only compare titles const filtered = searchResults.filter((v) => v && v.type === 'TV' && compareMedia(media, v.title));
const filtered = searchResults.filter((v) => v && v.type === 'TV' && compareMedia(media, v.title, media.releaseYear));
for (const result of filtered) { for (const result of filtered) {
// This gets filtered above but the linter Gods don't think so // This gets filtered above but the linter Gods don't think so