subliminal icon indicating copy to clipboard operation
subliminal copied to clipboard

TVDB refiner picks wrong series for Once Upon a Time 2011

Open ratoaq2 opened this issue 8 years ago • 6 comments

Just reporting some cases so you can keep track of them

commit b48c0c946bc19c37d55df0001c5bd74f6a5c2e6f
Merge: d5b4a4f a71cefb
Author: Antoine Bertin <[email protected]>
Date:   Mon Apr 11 23:22:08 2016 +0200

    Merge branch 'develop' of github.com:Diaoul/subliminal into develop
subliminal --debug --legendastv pass user download -f -l pt-BR -p legendastv -m 97 "Once.Upon.a.Time.S01E01.720p.HD
TV.X264-DIMENSION.mkv"
Collecting videos  [####################################]  100%  Once.Upon.a.Time.S01E01.720p.HDTV.X264-DIMENSION.mkvDEBUG:subliminal.cli:Collecting path Once.Upon.a.Time.S01E01.720p.HDTV.X264-DIMENSION.mkv
INFO:subliminal.core:Refining video with metadata
INFO:subliminal.core:Refining video with tvdb
INFO:subliminal.refiners.tvdb:Searching series 'Once Upon a Time'
DEBUG:subliminal.refiners.tvdb:Found 15 results
DEBUG:subliminal.refiners.tvdb:Found exact match on series u'Once Upon A Time' (no year)
DEBUG:subliminal.refiners.tvdb:Discarding series name u'Once Upon a Time' mismatch on year 2011
DEBUG:subliminal.refiners.tvdb:Discarding series name u'Once Upon a Time' mismatch on year 2011
DEBUG:subliminal.refiners.tvdb:Found series {u'seriesId': u'', u'status': u'Ended', u'added': u'2008-11-26 17:53:49', u'airsTime': u'', u'network': u'PBS', u'rating': u'', u'overview': u"A children's show centering around a witch named Kerfumbly, who has kidnapped a librarian named Marion, and holds her prisoner in her dungeon. In each episode, Kerfumbly demands a different kind of story from Marion, who gathers materials from the dungeon, puts them into a machine, and out pops a book. Marion then reads the book to the audience while illustrations of the story are shown on the screen. This show was filmed in Omaha, Nebraska for Nebraska Public Television, and was shown widely in the late 1970's and early 1980's. ", u'lastUpdated': 1457589412, u'id': 83882, u'seriesName': u'Once Upon A Time', u'firstAired': u'', u'addedBy': 5697, u'banner': u'', u'networkId': u'', u'genre': [u'Children'], u'airsDayOfWeek': u'', u'runtime': u'15', u'siteRating': 7.2, u'zap2itId': u'', u'imdbId': u'', u'aliases': []}
INFO:subliminal.refiners.tvdb:Getting series episode 1x1
DEBUG:subliminal.refiners.tvdb:Found episode {u'seriesId': 83882, u'airsAfterSeason': None, u'dvdEpisodeNumber': None, u'productionCode': u'', u'overview': None, u'airedSeasonID': None, u'thumbAdded': u'', u'episodeName': u'Gingerbread Boy', u'airedSeason': 1, u'airsBeforeSeason': None, u'showUrl': u'', u'id': 410604, u'dvdDiscid': u'', u'filename': u'', u'dvdSeason': None, u'writers': [], u'airedEpisodeNumber': 1, u'absoluteNumber': None, u'thumbHeight': None, u'imdbId': u'', u'lastUpdated': 1227750853, u'director': u'', u'lastUpdatedBy': 5697, u'dvdChapter': None, u'airsBeforeEpisode': None, u'language': {u'overview': u'en', u'episodeName': u'en'}, u'thumbAuthor': 1, u'firstAired': u'', u'guestStars': [], u'siteRating': 7.6, u'thumbWidth': None}

It selects tvdb_id = 83882 and the correct one is tvdb_id=248835 with name = u'Once Upon a Time (2011)' and aliases = [u'Once Upon a Time 2011']

Since you're iterating over the results and picking the first one that matches, it would be better to have the results sorted (like it was some commits before).

IMO, this is a minor issue.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ratoaq2 avatar Apr 12 '16 05:04 ratoaq2

I'm not sure how it would've selected the correct one if the year isn't in the filename. The refiner picks the first one that matches on the year.

Year is matched two times. First against the firstAired. If the video has no year this test is skipped. A second time agaist the seriesName itself split in parts (series + year) and here however matching is done in a stricter fashion so videos without year do not match series with TVDB names containing one (aliases included).

So Once Upon A Time will match Once Upon A Time but not Once Upon A Time 2011 nor Once Upon A Time (2011)

See the result on tvdb search.

Diaoul avatar Apr 12 '16 05:04 Diaoul

I agree with you. For instance, House of Cards has the year in the filename, so video.year is always there. But this case, you have no year or any other hint in the filename. I don't know if having the results sorted (show name + alias without year info, show status, etc) would help to pick the most probable one.

ratoaq2 avatar Apr 12 '16 05:04 ratoaq2

For TV shows, I think the latest (largest) year is likely to be what is wanted the vast majority of the time. But I don't know how you can code things to take advantage of that probability while still allowing it to match in the rare cases when the filename has no year and no year is the match that is wanted.

jtwill avatar Apr 12 '16 05:04 jtwill

The problem is the filename is incomplete, it should contain the year. Here we have a perfect match on the title and that's all the information we have. I don't know how to do better than this without completely discarding old tv shows which can prove harmful in some cases.

I suggest an optional argument for this refiner, something like max_age with a timedelta parameter that will ignore series older than the given value. I doubt it will make it through the CLI but it will be available in the library.

Diaoul avatar Apr 12 '16 21:04 Diaoul

Let's consider these 2 cases:

  • A filename with the year (e.g.: House of Cards 2013) In case of multiple name matches: it should pick the one that has an year and the year matches.
  • A filename without the year (e.g.: Once Upon a Time) In case of multiple name matches: There are several options here. And all of them could be configured with parameters/arguments of the refiner (but then the refiner can get a bit more complex than it should). Probably, by default you shouldn't enhance it (my preference). Or, you should prefer results that have an year defined over results without an year defined.

ratoaq2 avatar Apr 12 '16 22:04 ratoaq2

I don't see why the latest should be chosen if no year is present in the filename. This is quite an uncommon case. This is the expected behavior for TVDB refiner. I will add some option to tweak this but it's still unclear what should be configurable in this refiner.

Diaoul avatar Apr 24 '16 22:04 Diaoul