fix: issue #523 allows a broader range of totalSeasons values #524
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
#523 (comment)
Other information