ZeroQI / Hama.bundle

Plex HTTP Anidb Metadata Agent (HAMA)
GNU General Public License v3.0
1.19k stars 110 forks source link

[tvdb-385542] Yuukoku no Moriarty - Title issue #458

Closed DJScias closed 3 years ago

DJScias commented 3 years ago

Hello there,

The second part of Yuukoku no Moriarty started releasing and while parsing it looks fine at first sight.. It also isn't.

As you can see below, instead of using the right title it just calls it "Episode 13" image

The logs are the following: Yuukoku no Moriarty [tvdb-385542].filelist.log Yuukoku no Moriarty [tvdb-385542].scanner.log Yuukoku no Moriarty [tvdb-385542].agent-search.log Yuukoku no Moriarty [tvdb-385542].agent-update.log

I noticed from agent-update.log that it says it saved the episode info to episode_7985195_x-ja.json. So I went to check it:

{"data":{"id":7985195,"airedSeason":1,"airedSeasonID":1855604,"airedEpisodeNumber":13,"episodeName":"A Scandal in the British Empire, Act 2","firstAired":"2021-04-11","guestStars":[],"directors":[],"writers":[],"overview":"Following William's plan, Albert invites Irene to a masquerade, where a game with the famed \"Lord of Crime\" as its theme is being played. Dressed as a man, Irene uses the game to contact Albert, pleading for her safety in return for the stolen papers.","language":{"episodeName":"en","overview":"en"},"productionCode":"","showUrl":"","lastUpdated":1618150055,"dvdDiscid":"","dvdSeason":null,"dvdEpisodeNumber":null,"dvdChapter":null,"absoluteNumber":13,"filename":"","seriesId":385542,"lastUpdatedBy":159151,"airsAfterSeason":null,"airsBeforeSeason":null,"airsBeforeEpisode":null,"imdbId":"tt14425428","contentRating":"TV-14","thumbAuthor":null,"thumbAdded":"","thumbWidth":null,"thumbHeight":null,"siteRating":0,"siteRatingCount":0,"isMovie":0}}

(Github doesn't allow .json, sorry).

It seems the key does exist: "episodeName":"A Scandal in the British Empire, Act 2" yet for some reason it isn't using it like it is from the rest of the files? Yet it is pulling the summary?

TVDB link: https://thetvdb.com/series/moriarty-the-patriot

Is this something on my end? Or what's going on here? The data seems to exist, and the summary is taken fine. The episode just doesn't take the right name.

If more information is required, please do let me know.

ZeroQI commented 3 years ago

settings: language_episodes: ['en', 'x-ja', 'ja']

metadata.seasons[ 1].episodes[ 13] [?] rank: 0, source_title: TheTVDB, title: "Episode 13" [!] title: Episode 13, language_rank 0, rank: 0, len(languages): "3" [x] title Sources: TheTVDB, AniDB| (TheTVDB), AniDB Inside: '['TheTVDB', 'AniDB']' Value: 'Episode 13'

TVDB data: [X] s1e13 s01e013 anidbid: air_date: 2021-04-11 abs_number: 13, title: Episode 13

tvdb_ep_json: "episodeName":"A Scandal in the British Empire, Act 2", "language":{"episodeName":"en","overview":"en"}

the json file had "episodeName":"Episode 13" if you look at /volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/TheTVDB/json/385542/episode_7985195_x-ja.json

https://github.com/ZeroQI/Hama.bundle/blob/master/Contents/Code/TheTVDBv2.py lines 207-212 for tvdb episode title

line 201 displays title: Episode 13 which was from Dict(episode_json, 'episodeName') also title is from [1] while summary from [2] so different json language files for episode, probably not updated at same time on thetvdb...

Episode 13 aired April 11, 2021 (today), so cache issue, and episode 14 title is "Episode 14" so updated on releade day seemingly after airing... Did you know btw that TheTVDB will stop soon as they go for paying services for API and HAMA code is not ready for it ? Still deciding which way to go, but we will loose tvdb2/3/4 functionnality most likely...

DJScias commented 3 years ago

Hello there,

Thank you for answering me so fast. I have a few things to note however..

the json file had "episodeName":"Episode 13" if you look at /volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/TheTVDB/json/385542/episode_7985195_x-ja.json

I linked this file above in a code block and it actually has "episodeName":"A Scandal in the British Empire, Act 2", like I mentioned in the first post so.. No it doesn't? (To what you're saying)

What I do however see is "episodeName":"Episode 13" in the episodes_page1_en.json file, is it prioritizing that over the episode_7985195_x-ja.json file which does have a filled in episodeName?

I'm just trying to figure it out a bit, because the x-ja file -does- have the correct episodeName in it, in contrary to what you're writing.

I know about TVDB stopping soon, and I'm mostly just waiting to see what site you're going to use for episode summaries after. I maintain AniDB summaries for the newly releasing anime's (https://anidb.net/user/842328) but if you're going to switch to another site I can easily start doing it there too. I mostly just need to know where you're going and I can do my part in contributing data.

ZeroQI commented 3 years ago

Because you have episode settings: language_episodes: ['en', 'x-ja', 'ja'], it does prioritize the 'en' json which has wrong title, but the title is correct in the x-ja one, but the agent has no way to know...

The json will probably be ok tomorrow and correct itself by next week unless you delete then, clear plex cache by searching a custom series called "clear-cache" (cancel custom match afterwards)

AniDB support episode titles in other languages, but does it support summaries in languages other than english? i might code tvdb with an api code in settings in a first time but the summaries in languages other than english will suffer in the meantime, possibly in english too if anidb doesn't have them

DJScias commented 3 years ago

Because you have episode settings: language_episodes: ['en', 'x-ja', 'ja'], it does prioritize the 'en' json which has wrong title, but the title is correct in the x-ja one, but the agent has no way to know...

The json will probably be ok tomorrow and correct itself by next week unless you delete then, clear plex cache by searching a custom series called "clear-cache" (cancel custom match afterwards)

Perfect, this makes sense then. Weird that summary comes from x-ja and title doesn't but I guess there's probably a reason for that. Doesn't matter really, just that I understand why.

Also unfortunately AniDB does not seem to do other language descriptions. Hence I'm curious what the other options are that are being considered atm. If so, I can start pushing summary information to those links like I'm doing for AniDB but yeaaaah. TVDB going paid API after all their data comes from members is hard to work around knowing how 'complete' it is.

ZeroQI commented 3 years ago

Will close that for the moment, you can follow the thread about TVDB future as it is being discussed

DJScias commented 3 years ago

No problem.

Also to note on the issue: I did a re-pull from metadata now (removed the folder in the TheTVDB/json folder) and the title also populated.

I guess I just got surprised that it was capable of getting the summary cached but not the title at the same time. Thanks again for the help though!