morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.79k stars 216 forks source link

UK tv show “Better” mixed up with US tv serie “Better Call Saul” (provider: gestdown) #2077

Closed alneven closed 1 year ago

alneven commented 1 year ago

Describe the bug hello there, as discussed in Discord I have the UK show Better in my downloads and wanted to download ENG subtitles for it. The show has already 3 aired EPs. So today I turned the download of ENG sub in bazarr on and got very fast all the 3 episode matching sub downloaded. This was a bit odd for me, therefore I run the manuall search and checked the release group was LOL (old scene group, not even active in the UK). So I clicked the button to download the sub on my device and saw it is for Better Call Saul. Then I asked for some advise on Discord and we came to the fact that this shouldn’t be the case even the tv show Better not yet exists on addic7ed (!)

To Reproduce Steps to reproduce the behavior:

  1. Go to Sonarr, add the UK tv show Better, download of the 3 released episodes
  2. Check it in Bazarr, add the provider gestdown
  3. Search
  4. Verify entries / download the sub to your device (not server)

Expected behavior Message: no subtitles found

Screenshots C178EA53-5C65-483C-800D-2569A6A21264 6F6492F5-2691-4C0E-9273-55F329852F89 35AB81A2-67BF-4C3C-976A-88BE6D5FF5BD 2EFE2A96-6AD9-47C8-B6AF-8EDFAF9AF48A B9489BFE-9CCC-4D66-ACA7-80F3455B50A3 BB049B7D-4C2C-458B-BE23-EC656E80A0B1

Software (please complete the following information):

Additional context

alneven commented 1 year ago

two extra screenshots

5E79337A-1C3F-4272-B3EC-28361891F6E1 C6A6DFED-C38D-4D38-B773-668692265873

morpheus65535 commented 1 year ago

@Belphemur could you take a look at this issue please? Seems strange to have a match on series and year since it's not the good one at all.

Belphemur commented 1 year ago

Definitely a problem.

Currently, I don't do exact match with the series name.

Addicted doesn't store the year of the series either (sometimes they do in the title when there are conflicts).

Addicted has a tendency of merging languages (as you can see on the screenshot), adding UK to weird place and not respecting tvdb naming scheme.

I need to think of a good way to fix this. I technically could get the dates from Tvdb for matching shows then return that to the provider and use it as part of the scoring.

morpheus65535 commented 1 year ago

@Belphemur does the addic7ed provider (or yours of course) return the tvdb_id? We can compare it and assume year is a match if tvdb_id do match, right?

Belphemur commented 1 year ago

Addicted provider doesn't have the tvdb_id. However, for the shows I match with TvDB I could return it and use it for the parsing of the returned show in the gestdown provider. That'd be quite easy to add.

I'll see if I have time later today to do that.

Logic

Logic to be used for the gestdown provider in bazarr.

  1. Match by TvDB id
  2. If not found, match by exact name
  3. if not found, return not found
morpheus65535 commented 1 year ago

@Belphemur thanks!

If tvdb_id match, series/movie title and year should match. If tvdb_id is found, return [].

Belphemur commented 1 year ago

I just realized, it's a little more work on my side. I don't have the tvdb_id but the tmdb_id (since tvdb had ... shitty pricing for accessing their API --").

I'll implement track.tv to get the tvdb_id for the shows and return that.

I'll update this issue and use it for the modification to the gestdown provider.

(also unrelated @morpheus65535 the gestdown service is now getting around 30 Millions daily requests ^^, thanks to Cloudflare to cache around 70% of all those requests).

morpheus65535 commented 1 year ago

@Belphemur why not get the tvdb_id for each series using this?

https://developers.themoviedb.org/3/tv/get-tv-external-ids

Belphemur commented 1 year ago

Hoooo, I didn't see they had that endpoint, thanks ! That going to make things quite easy :D

Belphemur commented 1 year ago

I have a working version, but Addicted being Addicted, I have 270 shows that have duplicate matching for TVDB_ID. The issue is, Addicted don't always put the year for a show, actually, they only do it in case of dupe.

I already have an algorithm in mind to fix most cases.

morpheus65535 commented 1 year ago

@Belphemur in that case maybe you can match by number of seasons or number of episodes? Hope you get a solution to that issue!

Belphemur commented 1 year ago

@morpheus65535 Tried that, still lots of dupe (same amount actually, too many show stop at one season or more likely, old show stopped at 1 season. Remake just started so ... 1 season).

Number of episodes might be too restrictive. Addicted doesn't always have the full list of episode right away.

What I need to do is group the dupe together, find those that have the date set on them like Accused (2023) vs Accused and search for tv show for Accused and discard the one that started in 2023 to get the tvdb_id of Accused. (Most of the time it'd be the next show in the list from the search of TMDB).

morpheus65535 commented 1 year ago

@Belphemur ok understood. Your strategy seems to be the best you can do with what you have available.

Belphemur commented 1 year ago

@morpheus65535 Everything is in place, I still have dupe, but real dupe where the same show is on Addicted but with different name.

I've updated the provider in #2078 to use the tvdb_id.

morpheus65535 commented 1 year ago

@Belphemur thanks my friend, it's really appreciated!

@alneven your issue should be fixed in upcoming beta. Can you test and report quickly please?

alneven commented 1 year ago

@alneven your issue should be fixed in upcoming beta. Can you test and report quickly please?

uh, @morpheus65535 I will check how can I do it, I'm currently on latest docker container, I guess I should to switch to tag "develop"

morpheus65535 commented 1 year ago

@alneven yes if you're using LSIO images, switch to linuxserver/bazarr:development

alneven commented 1 year ago

Now I get “no result” Its working.