Small fix for Kokoshka source #453
Labels
No labels
MediaFlow Proxy
autorelease: pending
autorelease: tagged
bug
documentation
duplicate
enhancement
help wanted
invalid
question
wontfix
🇩🇪 German
🇫🇷 French
🇮🇳 Indian
🇸🇦 Arabic
🌐 Multi
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Creepso/webstreamr-github#453
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi
There is a case where you search for a movie that doesn't exist in the website but the search give results of old movies.
The solution would be to add a strict check between title and year from tmdb and title and year in the html(after the search query)...
Case where it happens?
Go on the movie called "Steve" on stremio and see that kokoshka will fetch other movies because the "Steve" movie doesn't exist there.
On my test I fixed with this code, of course might need more adjustment.
if (type === 'movie') {
const normalize = (str: string) =>
str.toLowerCase().replace(/[:!?.,'"()-]/g, '').replace(/\s+/g, ' ').trim();
With this fix the source would be perfect because I tested in different aspects and this was the olny bug I found.
unfortunately your code snippet does not match any of what we have atm. so basically, to confirm, we can normalize name/title when doing a search and for movies we should additionally check that the year diff is <= 5, is that correct?
The logic
Normalize
If the title doesn’t match at all → reject.
Or, if the year doesn’t match and the titles differ too much in length (difference > 5 characters) → reject.
came up with something similar in
bbdd968. we can fine-tune that of course and add normalizing if needed, so far it was looking quite good