ZeroQI / Hama.bundle

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

anidb3 & anidb4 both fail when retrieving metadata for series without any relations #472

Closed NickDuijndam closed 2 years ago

NickDuijndam commented 2 years ago

I've been moving over my anime library to the Hama agent. I've mostly been using anidb3/4 for this, but i've encountered an issue when moving over Redo of healer. Since this anime only has a single season (no extras or OVAs) it seems to throw an exception when trying to run the AdjustMapping section.

=== anidb34.AdjustMapping() =================================================================================================================================
adjusting mapping for 'anidb3/tvdb' & 'anidb4/tvdb6' usage
season_map: {'15277': {'max': 1, 'min': 1}, 'max_season': 1}
relations_map: {}
--- tvdb mapping adjustments --------------------------------------------------------------------------------------------------------------------------------
TVDB Before: {'s1': {'15277': '0'}}
Checking AniDBid: 15277
ERROR: Unexpected exception hit
Exception: "'15277'"
If a key error, look at the 'season_map'/'relations_map' info to see why it is missing
Source is 'tvdb6' so removing AniDB & TVDB metadata from memory to prevent incorrect data from being loaded

I'm not very familiar with now the agent works but adding an extra check to see if the series/season exits in the relations_map seems to fix the issue. I have created a simple pull request with this fix: #471 Feel free to close it if this is not the proper solution :)

Agent update log: Kaifuku Jutsushi no Yarinaoshi.agent-update.log

ZeroQI commented 2 years ago

"Kaifuku Jutsushi no Yarinaoshi\Kaifuku Jutsushi no Yarinaoshi [anidb3-15277]"

Why using a relationship based anidb3 mode with a series that have no relationships of your own account?

NickDuijndam commented 2 years ago

I'm trying to automate adding anime to my library and since I don't know if a show will have multiple seasons down the line I want to all make them use anidb3/anidb4 just in case.

ZeroQI commented 2 years ago

Would have used anidb and moved I. Grouping folders or TVDB but mapping file with missing tvs would have caused issues...