ZeroQI / Hama.bundle

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

Ninja Scroll movie matches to TV Show with the Hama movies agent. #507

Closed Tyestor closed 2 years ago

Tyestor commented 2 years ago

HamaMovies behaviour. It appears to be pulling metadata from the tv show's TheTVDB page: https://thetvdb.com/series/ninja-scroll image

Strange information here - 1993 is the release year of the movie but the title is that of the TV Show. This is the AniDB page for the movie: https://anidb.net/anime/277 image

Changing the agent to "The Movie Database" fixes the matching. image

Folder structure: Ninja Scroll (1993)/Ninja Scroll (1993) [imdb-tt0107692][WEBDL-720p][10bit][x265][FLAC 2.0][JA+EN]-Omotenashi

Logs: com.plexapp.agents.hama.log com.plexapp.system.log Ninja Scroll (1993).agent-update.log Ninja Scroll (1993).agent-search.log

ZeroQI commented 2 years ago

if this is the movie [https://anidb.net/anime/277], why did you associate with the series entry [https://anidb.net/anime/681] to complain it shows metadata with the series ?

=============================================================================================================================================================
common.PlexLog(file="/config/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/_Logs/Anime Movies/Ninja Scroll (1993).agent-search.log", movie=True)
[!] file:       "/media/anime-movies/Ninja Scroll (1993)/Ninja Scroll (1993) [imdb-tt0107692][WEBDL-720p][10bit][x265][FLAC 2.0][JA+EN]-Omotenashi.mkv"
[ ] library:    "Anime Movies"
[ ] root:       "/media/anime-movies"
[ ] path:       "Ninja Scroll (1993)"
[ ] Plex root:  "/config/Plex Media Server"
[ ] Log folder: "Plug-in Support/Data/com.plexapp.agents.hama/DataItems/_Logs/Anime Movies"
[ ] Log file:   "Ninja Scroll (1993).agent-search.log"
[ ] Logger:     "0x14a5cfbd6b38"
[ ] mode:       "w"
=== Search() ================================================================================================================================================
title: 'Ninja Scroll', name: 'Ninja Scroll', filename: '%2Fmedia%2Fanime-movies%2FNinja%20Scroll%20%281993%29%2FNinja%20Scroll%20%281993%29%20%5Bimdb-tt0107692%5D%5BWEBDL-720p%5D%5B10bit%5D%5Bx265%5D%5BFLAC%202%2E0%5D%5BJA%2BEN%5D-Omotenashi%2Emkv', manual: 'True', year: '1993'
start: 2022-03-12 18:16:43,029762
=============================================================================================================================================================
--- force id ------------------------------------------------------------------------------------------------------------------------------------------------
--- source searches -----------------------------------------------------------------------------------------------------------------------------------------
=== AniDB.Search() ==========================================================================================================================================
orig_title: 'Juubee Ninpuuchou: Ryuuhougyoku Hen', orig_title_cleansed: 'juubee ninpuuchou ryuuhougyoku hen'
--- full title ----------------------------------------------------------------------------------------------------------------------------------------------
len AniDBTitlesDB: 14071
[+] score: 100, aid:   681, title: 'Juubee Ninpuuchou: Ryuuhougyoku Hen', title_cleansed: Juubee Ninpuuchou: Ryuuhougyoku Hen
[=] best_score: 100, best_aid:   681, best_title: Juubee Ninpuuchou: Ryuuhougyoku Hen
elapsed_time: 0.238
=============================================================================================================================================================
end: 2022-03-12 18:16:43,268122

in anidb.py search part, it use the meta title because you associated with the wrong series, it re-uses the wrong title, you have to de-associate, change the title and search again, or search manually [search options]

  orig_title           = media.title if movie else media.show
  orig_title_cleansed  = common.cleanse_title(orig_title)

Working as designed

Tyestor commented 2 years ago

im extremely confused as to how you think this is working as designed? you also have a serious issue with closing issues before they have been fully dealt with.

if this is the movie [https://anidb.net/anime/277], why did you associate with the series entry [https://anidb.net/anime/681] to complain it shows metadata with the series ?

i only did that after it didn't work the first time. regardless, the movie does not show up in fix match search options, only the tv show does. the movie does not get auto matched, only the tv show does. you would have seen this if you had taken 5 seconds to look at the second screenshot in my post.

https://i.imgur.com/42RBaKa.mp4

the only way to get it to match is to unmatch and match it manually.

image

but if i'm doing that, then there's an obvious issue.

ZeroQI commented 2 years ago

The filename without extension is used as title until the agent assigns the unique ID and the agent update change it The title it uses for the search here is not from the filename as it got assigned previously and metadata have over-written it: orig_title: 'Juubee Ninpuuchou: Ryuuhougyoku Hen', orig_title_cleansed: 'juubee ninpuuchou ryuuhougyoku hen' Since the title is the one of the tv series, it does find the tv series... I need the log of the very first search showing the filename based title and finding the wrong series

The agent is on the verge of being permanently broken due to tvdb api change, as soon as they disable vs API and you have one series that match badly. Additionally I do not run Plex or my agent nor the scanner so please excuse my lack of engagement