ZeroQI / Hama.bundle

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

Some shows not matching in plex #517

Closed JohnFawkes closed 2 years ago

JohnFawkes commented 2 years ago

So im not sure where to start with this. Basically i use sonarr and radarr for all my renaming and it can rename folders with imdb and/or tvdb at the end of the folder name and thats what i do. All my shows are named "Name of show (year of start date) [imdb-****] [tvdb-**]" I just recently started using ASS and HAMA since my anime library has been growing more and more and I wanted to have all my anime movies and shows in one library since im basically the only one who watches it anyway. Most of my anime has matched fine in plex (meaning metadata gets pulled, shows get named correctly and seasons/episodes get named and posters get set. However a handful of them arent getting matched at all even when i try to match manually. I always get no results found with hama or tvdb. Some of the shows are DR. Stone, One Piece, The strongest sage with the weakest crest, boruto, and The Ancient Magus' Bride. So these arent like non popular animes or anything like that. Is there any logs I can give you to see what is going on? When I do the manual match in plex i also add the anidb number with the show name when searching and still doesnt match. Ive also tried adding the anidb number to the end of the folder name no it looks like "Name of show (year of start date) [imdb-****] [tvdb-**] [anidb-**]" and still no matches find after refreshing library.

Any help would be greatly appreciated

ZeroQI commented 2 years ago

"Name of show (year of start date) [imdb-] [tvdb-] [anidb-**]" is not supported as the force ID would be taken by the IMDB part most likely.

"Name of show (year of start date) [anidb-**]" is supported.

The answer answer on why it doesn't match is in the *.search.log file (readme troubleshooting section for path) but you haven't attached them.

Matching manually should bring results do if it doesn't, the agent might be crashed, in any case no logs provided despite the troubleshooting section listing all file path, so cannot root cause...

JohnFawkes commented 2 years ago

So I was under the impression Hama could pull the tvdb from the folder name and cross-reference it against the xml file from scud and match it to anidb. Either way, I have 83 items in the library and I've only had to manually match like 5 of them or so and 5 of them don't match at all even when trying to manually match via "series name [anidb-**]" If it's true that I have to remove the imdb and tvdb numbers from the folder name, then I will most likely either need to switch to another agent or write some sort of script to auto rename folder after sonarr imports because the whole point of me using sonarr and the other arrs is for automation. Regardless here are the logs.

Dr. Stone (2019) [imdb-tt9679542] [tvdb-355774].agent-search.log

Boruto Naruto Next Generations (2017) [imdb-tt6342474].agent-search.log

One Piece (1999) [imdb-tt0388629] [tvdb-81797].agent-search.log

And here's an example of a series that matched just fine without me having to do anything

Skeleton Knight in Another World (2022) [imdb-tt14476236] [tvdb-401279].agent-search.log

ZeroQI commented 2 years ago

Hama can extract ONE forced ID and cross reference but not 2 or 3 IDs in the folder name...

Indeed for Dr Stone it used the IMDb ID and forced it, you won't get metadata that way.

You need to remove IMDb from authorized forced IDs in the code https://github.com/ZeroQI/Hama.bundle/blob/master/Contents/Code/__init__.py#L105

JohnFawkes commented 2 years ago

I can just remove the imdb from the folder name and stop sonarr from adding it. regardless, shouldnt it still match if i manually match with "series name [anidb-**]" as search when matching manually in plex regardless of what the actual folder name is?

ZeroQI commented 2 years ago

Log analysis

you can only have tvdb or anidb numbering, and it shapes the way specials are treated, so can't manage both at once Removing imdb as a ID source would fix some issues, however, It should match with "series name [anidb-**]"...

https://github.com/ZeroQI/Hama.bundle/blob/master/Contents/Code/__init__.py#L105 Lines 105-116 do the search For boruto, the anidb search was called https://github.com/ZeroQI/Hama.bundle/blob/master/Contents/Code/AniDB.py#L37 You would need to uncomment line 110 and 111 so it write the winning result if found, but to me it showed all series in logs as possible selection, unless you have a Plex issue like a corrupted database....

[-] score: 98, aid: 12661, title: "Boruto: Naruto Next Generations"