xbmc / metadata.tvshows.themoviedb.org.python

themoviedb.org TV Show scraper in Python for Kodi 18 (Leia) or later.
GNU General Public License v3.0
19 stars 26 forks source link

The plugin uses episode order as episode season and episode for doctor who #93

Closed ankurmittal closed 1 year ago

ankurmittal commented 1 year ago

When using this episode guide: https://www.themoviedb.org/tv/57243-doctor-who/episode_group/5e753a13cabfe400181eee29 as outlined here: https://kodi.wiki/view/Add-on:TMDb_TV_Shows#Episode_Orders the plugin messes up the episodes names, titile, season and episode number

For eg for S00E02 it scraps it as https://www.themoviedb.org/tv/57243-doctor-who/episode_group/5e753a13cabfe400181eee29/group/5e753a67a055ef00142b6124/episode/541d57b00e0a261e7a003dd4 rather than https://www.themoviedb.org/tv/57243-doctor-who/episode_group/5e753a13cabfe400181eee29/group/5e753a282f3b1700174eb4fd/episode/541d57aec3a36801cf007fa2

similarly for S02E01 it marks it as https://www.themoviedb.org/tv/57243-doctor-who/episode_group/5e753a13cabfe400181eee29/group/5e753a2dcabfe400111eea60/episode/541d57b3c3a3683af8005876 rather than https://www.themoviedb.org/tv/57243-doctor-who/episode_group/5e753a13cabfe400181eee29/group/5e753a2dcabfe400111eea60/episode/534f99660e0a267eaf0009cb

Doesn't parse any episodes in S13 (might be due to https://www.themoviedb.org/talk/635a4e7887e63e00795de4d1)

Doesn't scrap any specials which have episode numbering more than 46

pkscout commented 1 year ago

Please turn on Kodi debug logging, run a clean scrape, and then post a link to the entire log for review.

KarellenX commented 1 year ago

Doesn't parse any episodes in S13 (might be due to https://www.themoviedb.org/talk/635a4e7887e63e00795de4d1)

Yes, I can confirm that S13 does not scrape

For eg for S00E02 it scraps it as https://www.themoviedb.org/tv/57243-doctor-who/episode_group/5e753a13cabfe400181eee29/group/5e753a67a055ef00142b6124/episode/541d57b00e0a261e7a003dd4 rather than https://www.themoviedb.org/tv/57243-doctor-who/episode_group/5e753a13cabfe400181eee29/group/5e753a282f3b1700174eb4fd/episode/541d57aec3a36801cf007fa2

I am a bit confused on what results you expect. You are using an Episode Group. Episode Groups provide an alternate order to the main listed order. You are trying to scrape S00E02 which in the Chronological Order belongs to "Christmas Moments" But you are expecting to scrape S01E15 named "The Christmas Invasion" instead. Why?

ankurmittal commented 1 year ago

Episode group should only be used for grouping and ordering, not for scraping episode and season data. If you look at the json file returned when querying that episode group, we do see original season and episode in the output, so that is what should be used for scraping.

even the documentation here (https://kodi.wiki/view/NFO_files/Parsing) says: A Parsing NFO file cannot be used for Seasons or Episodes. Seasons and Episodes are matched via the correct TV Show.

By matching them using the order in the group the tool goes against the documentation, and it would make it complex to sync it with other tools like trackt.

I know jellyfin is able to parse and order it correctly.

KarellenX commented 1 year ago

Episode group should only be used for grouping and ordering, not for scraping episode and season data

Sorry, I don't understand that comment. Isn't that essentially the same? Why are you using Episode Orders if you don't want those orders? Why don't you use the main listing?

A Parsing NFO file cannot be used for Seasons or Episodes. Seasons and Episodes are matched via the correct TV Show.

That is correct. You cannot scrape an individual episode on its own. The episode is scraped as part of the tv show. ie. you can't point the scraper to an individual episode. The scraper finds the TV Show, then uses your file numbering to match episodes.

ankurmittal commented 1 year ago

Basically you want chronological order as defined by TMDB.

attaching the screenshot: Screenshot from 2022-10-27 12-26-21

The tool needs to present correct information along with the correct ordering when watching the show. If one needs to rename all the files according to the order (and not actual season and episode number), then the watch activity will not sync with other tools (like trakt)

KarellenX commented 1 year ago

So you want the benefit of the Chronological Order, but you want to maintain the original listing order so it can sync with Trakt.

Sorry, that is not possible.

ankurmittal commented 1 year ago

this is what it will look like on dvd and streaming services. the tool should present correct information (season and episode number) and should have the ability to sort based on Chronological Order (that is why it is called Chronological Order).

I don't understand why tool is mixing ordering with episode data scrapping.

Anyways I guess i will fork the plugin for my use-case and fix it locally

ankurmittal commented 1 year ago

Just for the data point jellyfin, trakt (https://trakt.tv/shows/doctor-who-2005/seasons/alternate/250), kodi's tvdb (dvd order plugin) and tmdb (https://www.themoviedb.org/tv/57243-doctor-who/episode_group/5e753a13cabfe400181eee29) are able to present the data correctly.

pkscout commented 1 year ago

I'm closing this, as the scraper is working as expected. The OP wants an alternate behavior that is not supported and could require additional changes to core Kodi along with heavy modifications to the scraper. Forking to program for the specific desired behavior is the best path.

KarellenX commented 1 year ago

@pkscout There is still the issue of S13 not scraping. But most likely an API problem.

pkscout commented 1 year ago

I'll take a look at it this weekend to confirm the S13 thing.