Closed ICEPrey closed 1 month ago
oh should I just replace
test('returns a filled object of anime data', async () => {
const data = await tmdb.fetchMediaInfo('60735', 'tv');
expect(data).not.toBeNull();
expect(data.episodes).not.toEqual([]);
expect(data.description).not.toBeNull();
});
in the main tmdb.test.ts with
test('returns a filled object of anime data', async () => {
const data = await tmdb.fetchMediaInfo('85937', 'tv');
expect(data).not.toBeNull();
expect(data.episodes).not.toEqual([]);
expect(data.description).not.toBeNull();
});
What kind of change does this PR introduce? This PR changes the findIdFromTitle method in the TMDB class. It updates the filtering logic for totalSeasons to allow for a range of +=2 seasons compared to the extraData.totalSeasons value. This change is to resolve the issue where the result demon slayer was not being returned due to strict matching of the totalSeasons value.
Did you add tests for your changes? Yes
If relevant, did you update the documentation?
no
Summary This PR addresses an issue where the findIdFromTitle method in the TMDB class was not returning the desired result for the Demon Slayer anime. The issue was caused by strict matching of the totalSeasons value. The changes introduced in this PR update the totalSeasons filtering logic to allow for a range of +=2 seasons which should increase the flexibility in matching the seasons value. The comment describing the filtering logic has also been updated to reflect these changes. https://github.com/consumet/consumet.ts/issues/523#issue-2266536037
Other information