ZeroQI / Hama.bundle

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

Specials with 'anidb2' tag getting named with AnidDB episode names #329

Closed mikethecalamity closed 5 years ago

mikethecalamity commented 5 years ago

I've tried this with the following:

Dragon Ball Z The Dead Zone [anidb2-1043]
Dragon Ball Z The World's Strongest [anidb2-1044]
Dragon Ball Z The Tree of Might [anidb2-762]

They all are correctly assigned their season/episode from TVDB, but their episode titles are all "Complete Movie". This is the title it would have from AniDB not TVDB.

mikethecalamity commented 5 years ago

Dragon Ball Z The Dead Zone [anidb2-1043].scanner.log

=============================================================================================================================================================
Library: 'no valid X-Plex-Token.id', root: '/volume1/User.Video/Anime', path: 'Dragon Ball Z The Dead Zone [anidb2-1043]', files: '1', dirs: '0'
Plex scan start: 2019-07-31 19:05:05,409466
=============================================================================================================================================================
Forced ID (series folder) - source: "anidb2", id: "1043"
-------------------------------------------------------------------------------------------------------------------------------------------------------------
AniDB mode (anidb2) enabled, loading mapping xml file (Local->ASS mod->ScudLee master)
URL: 'https://rawgit.com/ZeroQI/Absolute-Series-Scanner/master/anime-list-corrections.xml', Using cached file: '/tmp/ASS-anime-list-corrections.xml'
-- No valid tvbdbid found for anidbid '1043'
URL: 'https://rawgit.com/ScudLee/anime-lists/master/anime-list-master.xml', Using cached file: '/tmp/ASS-anime-list-master.xml'
anidb: '1043', tvbdid: '81472', name: 'Dragon Ball Z (1989)', mappingList: {'defaulttvdbseason': '0', 'episodeoffset': ''}
-------------------------------------------------------------------------------------------------------------------------------------------------------------
misc_count: {'Ball': 1, 'Zone': 1, 'Dead': 1, 'Dragon': 1, 'The': 1, 'Z': 1}
misc_words: []
-------------------------------------------------------------------------------------------------------------------------------------------------------------
"Dragon Ball Z The Dead Zone [tvdb-81472]" s00e001     (Orig: s01e001    ) "Word Search" "" "Dragon Ball Z The Dead Zone.mkv"
=============================================================================================================================================================
Plex scan end: 2019-07-31 19:05:05,461288
mikethecalamity commented 5 years ago

com.plexapp.agents.hama.log

2019-07-31 19:05:06,186 (804506300) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2I
wczYKbWFudWFsYjFzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZTExCnMxNgpkYTNkMzU0MmRiODVhNWNmczE3Cm9wZW5TdWJ0aXRsZXNIYXNoczEKMXM3CmVwaXNvZGVuczQKbmFtZXMxCjFzOAplcGlzb2RpY3M0MApEcmFnb24gQmFsbCBaIFRoZSBEZWFk
IFpvbmUgW3R2ZGItODE0NzJdczQKc2hvd3MxCjBzNgpzZWFzb25uczQKeWVhcnMxMzUKJTJGdm9sdW1lMSUyRlVzZXIlMkVWaWRlbyUyRkFuaW1lJTJGRHJhZ29uJTIwQmFsbCUyMFolMjBUaGUlMjBEZWFkJTIwWm9uZSUyMFthbmlkYjItMTA0M10lMkZEcmFnb24lMjBCYWxsJTIwWiUyMFRoZSUyMERlYWQlMjBab
25lJTJFbWt2czgKZmlsZW5hbWVzNDAKZGVjMDJiZjdmZGNkNDJmMmY5NzljNjBhNzdmYWI1NThlNGRmMzgxNXM4CnBsZXhIYXNoczIKLTFzOApkdXJhdGlvbnM2CjQxNzA4N3MyCmlkcjAK
2019-07-31 19:05:06,186 (804506300) :  DEBUG (runtime:49) - Received packed state data (80 bytes)
2019-07-31 19:05:06,187 (804506300) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2I
wczYKbWFudWFsYjFzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZTExCnMxNgpkYTNkMzU0MmRiODVhNWNmczE3Cm9wZW5TdWJ0aXRsZXNIYXNoczEKMXM3CmVwaXNvZGVuczQKbmFtZXMxCjFzOAplcGlzb2RpY3M0MApEcmFnb24gQmFsbCBaIFRoZSBEZWFk
IFpvbmUgW3R2ZGItODE0NzJdczQKc2hvd3MxCjBzNgpzZWFzb25uczQKeWVhcnMxMzUKJTJGdm9sdW1lMSUyRlVzZXIlMkVWaWRlbyUyRkFuaW1lJTJGRHJhZ29uJTIwQmFsbCUyMFolMjBUaGUlMjBEZWFkJTIwWm9uZSUyMFthbmlkYjItMTA0M10lMkZEcmFnb24lMjBCYWxsJTIwWiUyMFRoZSUyMERlYWQlMjBab
25lJTJFbWt2czgKZmlsZW5hbWVzNDAKZGVjMDJiZjdmZGNkNDJmMmY5NzljNjBhNzdmYWI1NThlNGRmMzgxNXM4CnBsZXhIYXNoczIKLTFzOApkdXJhdGlvbnM2CjQxNzA4N3MyCmlkcjAK
2019-07-31 19:05:06,187 (804506300) :  INFO (agentkit:957) - Searching for matches for {'openSubtitlesHash': 'da3d3542db85a5cf', 'episode': '1', 'name': None, 'episodic': '1', 'show': 'Dragon Ball Z The Dead Zone [tvdb-81472]', 'season':
 '0', 'plexHash': 'dec02bf7fdcd42f2f979c60a77fab558e4df3815', 'filename': '%2Fvolume1%2FUser%2EVideo%2FAnime%2FDragon%20Ball%20Z%20The%20Dead%20Zone%20[anidb2-1043]%2FDragon%20Ball%20Z%20The%20Dead%20Zone%2Emkv', 'year': None, 'duration'
: '-1', 'id': '417087'}
2019-07-31 19:05:06,187 (804506300) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/library/metadata/417087/tree'
2019-07-31 19:05:06,190 (804506300) :  INFO (common:152) - ==== common.PlexLog(file="/usr/local/plexdata/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/_Logs/Anime/Dragon Ball Z The Dead Zone [anidb2-1043].agent
-search.log")
2019-07-31 19:05:06,191 (804506300) :  DEBUG (runtime:88) - Sending packed state data (104 bytes)
2019-07-31 19:05:06,192 (804506300) :  DEBUG (runtime:924) - Response: [200] str, 672 bytes
2019-07-31 19:05:06,279 (80922d400) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5
nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNgo0MTcwODRzNApkYmlkaTAKczcKdmVyc2lvbm5zMTAKcGFyZW50R1VJRG5zOApwYXJlbnRJRHM3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZXM0NApjb20ucGxleGFwcC5hZ2VudHMuaGFtYTovL3R2ZGItODE0NzI%40bGFuZz1lbnM0Cmd1aWRzMTAKdHZkYi04MTQ3MnMyCm
lkcjAK
2019-07-31 19:05:06,279 (80922d400) :  DEBUG (runtime:49) - Received packed state data (1040 bytes)
2019-07-31 19:05:06,280 (80922d400) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5
nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNgo0MTcwODRzNApkYmlkaTAKczcKdmVyc2lvbm5zMTAKcGFyZW50R1VJRG5zOApwYXJlbnRJRHM3ClRWX1Nob3dzMTAKbWVkaWFfdHlwZXM0NApjb20ucGxleGFwcC5hZ2VudHMuaGFtYTovL3R2ZGItODE0NzI@bGFuZz1lbnM0Cmd1aWRzMTAKdHZkYi04MTQ3MnMyCmlk
cjAK
2019-07-31 19:05:06,280 (80922d400) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.hama://tvdb-81472?lang=en
2019-07-31 19:05:06,280 (80922d400) :  DEBUG (model:234) - Deserializing from /usr/local/plexdata/Plex Media Server/Metadata/TV Shows/4/cc136bcf951d142a6ffad6d7f30104e8632770b.bundle/Contents/com.plexapp.agents.hama/Info.xml
2019-07-31 19:05:06,294 (80922d400) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/library/metadata/417084/tree'
2019-07-31 19:05:06,297 (80922d400) :  INFO (common:152) - ==== common.PlexLog(file="/usr/local/plexdata/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/_Logs/Anime/Dragon Ball Z The Dead Zone [anidb2-1043].agent
-update.log")
2019-07-31 19:05:06,507 (80922d400) :  DEBUG (networking:166) - Requesting 'https://api.thetvdb.com/series/81472/images'
2019-07-31 19:05:17,383 (80922d400) :  DEBUG (model:229) - Serializing to /usr/local/plexdata/Plex Media Server/Metadata/TV Shows/4/cc136bcf951d142a6ffad6d7f30104e8632770b.bundle/Contents/com.plexapp.agents.hama/Info.xml
2019-07-31 19:05:17,385 (80922d400) :  DEBUG (runtime:88) - Sending packed state data (1064 bytes)
2019-07-31 19:05:17,385 (80922d400) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes
EndOfLine369 commented 5 years ago

need the series log

2019-07-31 19:05:06,297 (80922d400) :  INFO (common:152) - ==== common.PlexLog(file="/usr/local/plexdata/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/_Logs/Anime/Dragon Ball Z The Dead Zone [anidb2-1043].agent
-update.log")
mikethecalamity commented 5 years ago

That file is HUGE like 3000 lines long. Is there a specific section you need?

ZeroQI commented 5 years ago

I don't see a problem there... Please drag and drop the log file as we need

mikethecalamity commented 5 years ago
common.SaveFile() - CachePath: '/usr/local/plexdata/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems', file: 'AniDB/poster/145585.jpg'
metadata.seasons[ 0].episodes[  1]
[?] rank: 0, source_title:   AniDB, title: "Complete Movie"
[x] title                          Sources: (AniDB),TheTVDB                                               Inside: '['TheTVDB', 'AniDB']'  Value: 'Complete Movie'
[x] summary                        Sources: AniDB,(TheTVDB)                                               Inside: '['TheTVDB']'  Value: 'Gohan has been kidnapped! To make matters worse, the evil Garlic Junior is gathe..'
[x] originally_available_at        Sources: (AniDB),TheTVDB                                               Inside: '['TheTVDB', 'AniDB']'  Value: '1989-07-15'
[x] writers                        Sources: (AniDB),TheTVDB                                               Inside: '['TheTVDB', 'AniDB']'  Value: 'Toriyama Akira'
[x] directors                      Sources: (AniDB),TheTVDB                                               Inside: '['TheTVDB', 'AniDB']'  Value: 'Nishio Daisuke'
[x] rating                         Sources: (AniDB), TheTVDB, MyAnimeList, TheMovieDb, OMDb               Inside: '['TheTVDB', 'AniDB']'  Value: '6.24'
[x] thumbs                   ( 1)  Sources: (TheTVDB)                                                     Inside: '['TheTVDB']'  Value: '{'https://thetvdb.plexapp.com/banners/episodes/81472/411405.jpg': ('TheTVDB/episodes/411405.jpg', 1, None)}'
common.SaveFile() - CachePath: '/usr/local/plexdata/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems', file: 'TheTVDB/episodes/411405.jpg'
[x] duration                       Sources: (TheTVDB), AniDB, MyAnimeList, TheMovieDb, OMDb               Inside: '['TheTVDB', 'AniDB']'  Value: '1500000'
[x] content_rating                 Sources: AnimeLists, AniDB,(TheTVDB)                                   Inside: '['TheTVDB']'  Value: 'TV-PG'
metadata.seasons[ 0].episodes[  3]
[?] rank: 0, source_title:   AniDB, title: "Complete Movie"
[=] title                          Sources: (AniDB),TheTVDB                                               Inside: '['TheTVDB', 'AniDB']'  Value: 'Complete Movie'
[=] summary                        Sources: AniDB,(TheTVDB)                                               Inside: '['TheTVDB']'  Value: 'The Saiyajin named Taurus has come to Earth in order to plant a tree that will b..'
[=] originally_available_at        Sources: (AniDB),TheTVDB                                               Inside: '['TheTVDB', 'AniDB']'  Value: '1990-07-07'
[=] writers                        Sources: (AniDB),TheTVDB                                               Inside: '['TheTVDB', 'AniDB']'  Value: 'Toriyama Akira'
[=] directors                      Sources: (AniDB),TheTVDB                                               Inside: '['TheTVDB', 'AniDB']'  Value: 'Nishio Daisuke'
[=] rating                         Sources: (AniDB), TheTVDB, MyAnimeList, TheMovieDb, OMDb               Inside: '['TheTVDB', 'AniDB']'  Value: '5.99'
[=] thumbs                   ( 1)  Sources: (TheTVDB)                                                     Inside: '['TheTVDB']'  Value: '{'https://thetvdb.plexapp.com/banners/episodes/81472/411407.jpg': ('TheTVDB/episodes/411407.jpg', 1, None)}'
[=] duration                       Sources: (TheTVDB), AniDB, MyAnimeList, TheMovieDb, OMDb               Inside: '['TheTVDB', 'AniDB']'  Value: '1500000'
[=] content_rating                 Sources: AnimeLists, AniDB,(TheTVDB)                                   Inside: '['TheTVDB']'  Value: 'TV-PG'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
=== Update() ================================================================================================================================================
mikethecalamity commented 5 years ago

looks like it chose the anidb source for some reason?

mikethecalamity commented 5 years ago
--- AniDBTVDBMap --------------------------------------------------------------------------------------------------------------------------------------------
[+] AniDBid:   397, TVDBid:  81472, defaulttvdbseason:   0, offset:  12, name: Dragon Ball Z: Ryuuken Bakuhatsu!! Gokuu ga Yaraneba Dare ga Yaru
[+] AniDBid:   548, TVDBid:  81472, defaulttvdbseason:   0, offset:   6, name: Dragon Ball Z: Kyokugen Battle!! Sandai Super Saiya-jin
[+] AniDBid:   762, TVDBid:  81472, defaulttvdbseason:   0, offset:   2, name: Dragon Ball Z: Chikyuu Marugoto Choukessen
[+] AniDBid:   763, TVDBid:  81472, defaulttvdbseason:   0, offset:   3, name: Dragon Ball Z: Super Saiya-jin Da Son Gokuu
[+] AniDBid:   905, TVDBid:  81472, defaulttvdbseason:   0, offset:   7, name: Dragon Ball Z: Moetsukiro!! Nessen, Ressen, Chougekisen
    - season: [ 1],           [ 0], range:       [000-000], offset:   0, text: 2-8;3-8
[+] AniDBid:   906, TVDBid:  81472, defaulttvdbseason:   0, offset:  10, name: Dragon Ball Z: Super Senshi Gekiha!! Katsu no wa Ore Da
    - season: [ 1],           [ 0], range:       [000-000], offset:   0, text: 2-11;3-11
[+] AniDBid:  1043, TVDBid:  81472, defaulttvdbseason:   0, offset:   0, name: Dragon Ball Z (1989)
[+] AniDBid:  1044, TVDBid:  81472, defaulttvdbseason:   0, offset:   1, name: Dragon Ball Z: Kono Yo de Ichiban Tsuyoi Yatsu
    - season: [ 1],           [ 0], range:       [000-000], offset:   0, text: 2-2;3-2
[+] AniDBid:  1045, TVDBid:  81472, defaulttvdbseason:   0, offset:   4, name: Dragon Ball Z: Tobikkiri no Saikyou Tai Saikyou
[+] AniDBid:  1046, TVDBid:  81472, defaulttvdbseason:   0, offset:   5, name: Dragon Ball Z: Gekitotsu!! 100-oku Power no Senshi-tachi
[+] AniDBid:  1069, TVDBid:  81472, defaulttvdbseason:   0, offset:   8, name: Dragon Ball Z: Ginga Girigiri!! Bucchigiri no Sugoi Yatsu
    - season: [ 1],           [ 0], range:       [000-000], offset:   0, text: 2-9;3-9
[+] AniDBid:  1070, TVDBid:  81472, defaulttvdbseason:   0, offset:   9, name: Dragon Ball Z: Kiken na Futari! Super Senshi wa Nemurenai
    - season: [ 1],           [ 0], range:       [000-000], offset:   0, text: 2-10;3-10
[+] AniDBid:  1071, TVDBid:  81472, defaulttvdbseason:   0, offset:  11, name: Dragon Ball Z: Fukkatsu no Fusion!! Gokuu to Vegeta
[+] AniDBid:  1474, TVDBid:  81472, defaulttvdbseason:   0, offset:  14, name: Dragon Ball Z: Zetsubou e no Hankou!! Nokosareta Chousenshi - Gohan to Trunks
[+] AniDBid:  1530, TVDBid:  81472, defaulttvdbseason: (a)1, offset:   0, name: Dragon Ball Z
    - season: [ 0],           [ 0], range:       [000-000], offset:   0, text: 1-0;2-0;3-0;4-0;5-0
[+] AniDBid:  2336, TVDBid:  81472, defaulttvdbseason:   0, offset:  13, name: Dragon Ball Z Special: Tatta Hitori no Saishuu Kessen - Freezer ni Idonda Z Senshi Son Gokuu no Chichi
[+] AniDBid:  2643, TVDBid:  81472, defaulttvdbseason:   0, offset:  16, name: Dragon Ball Z Gaiden: Saiya-jin Zetsumetsu Keikaku
    - season: [ 1],           [ 0], range:       [000-000], offset:   0, text: 401-17;402-18;403-18
[+] AniDBid:  6127, TVDBid:  81472, defaulttvdbseason:   0, offset:  15, name: Dragon Ball: Ossu! Kaette Kita Son Gokuu to Nakama-tachi!!
[+] AniDBid:  6540, TVDBid:  81472, defaulttvdbseason:   0, offset:  19, name: Dragon Ball Z: Atsumare! Gokuu World
[+] AniDBid:  8809, TVDBid:  81472, defaulttvdbseason:   0, offset:  20, name: Dragon Ball: Episode of Bardock
[+] AniDBid:  9314, TVDBid:  81472, defaulttvdbseason:   0, offset:  22, name: Dragon Ball Z: Kami to Kami
    - season: [ 0],           [ 0], range:       [000-000], offset:   0, text: 1-0;2-0;3-0
[+] AniDBid: 10742, TVDBid:  81472, defaulttvdbseason:   0, offset:  23, name: Dragon Ball Z: Fukkatsu no "F"
    - season: [ 0],           [ 0], range:       [000-000], offset:   0, text: 1-0;2-0;3-0;4-0
Saved possible tmdb/imdb values for later (''/'tt3819668'), since not in AnimeList.
ZeroQI commented 5 years ago

[x] title Sources: (AniDB),TheTVDB

Translation: movies using AniDB2 mode with episode title source with AniDB first (NOT THE DEFAULT, which is anidb first for series title, then tvdb first for ep title due to the '|' separator) for episode title get "Complete Movie" AniDB title as it should...

If you want series title from AniDB and ep titles from TheTVDB, set the title agent setting to: AniDB, TheTVDB | TheTVDB , AniDB

If you want "Complete Movie" AniDB episode names to be skipped for anidb2 (seen as TheTVDB vwhen Hama get it) that is doable

We have the opposite issue with Thetvdb having 'episode 4' for example...

We could edit the code to disregard filler titles....

mikethecalamity commented 5 years ago

Awesome! That title agent worked. Thank you.

That might be neat if "Complete Movie" is skipped for anidb2.

ZeroQI commented 5 years ago

Note for latter:

ZeroQI commented 5 years ago

https://github.com/ZeroQI/Hama.bundle/issues/339 Adding dates to titles to ignore