[Rel] HTTP Anidb Metadata Agent (HAMA)

Please test if my agent cause this or not and repost. i tested windows and synology and all works
Do you have the same issue with my agent removed ? Because i don’t think it is responsible in any way…

@ZeroQI your lastest github commit seems to be missing half the code. its only 380ish lines.

@ZeroQI said:
Please test if my agent cause this or not and repost. i tested windows and synology and all works
Do you have the same issue with my agent removed ? Because i don’t think it is responsible in any way…

Where should I be looking in Win10 to see what’s happening? Be more than happy to zip the files and post them here.

@Remnence said:
ZeroQI your lastest github commit seems to be missing half the code. its only 380ish lines.

Good point! I checked out the previous revision and not only is there a lot more code in the module __init__, but the crash on start doesn’t occur. That last checkin seems to be the problem. :slight_smile:

i pasted the scanner code on the agent page on github. Congratulations to remnence for noticing first
Zip release attached earlier is ok

!> @ZeroQI said:

i pasted the scanner code on the agent page on github. Congratulations to remnence for noticing first
Zip release attached earlier is ok

Just downloaded the latest and it works!

Thanks for confirming. For those who missed, you can use a tvdb.id file in the serie folder with the serie tvdb.id inside and it will display absolute series with seasons like thetvdb… (or put [tvdb-xxxxx] at the end of the serie folder name)
you can specify the anidbid the same…

Please test and report any issue

Do you have a link for the tvdb.id format? or do you just put an empty file named that in the folder?

Create an empty text file, put the tvdb id number in it, save and rename to tvdb.id, or add ’ [tvdb-123456]’ at the end of the folder name with 123456 being the tvdbid of course…

Hi @ZeroQI
I’ve just reinstall my PMS and your HAMA + ASS (downloaded about an hour ago from your github)

It works quite fine except that it doesn’t download any poster/banner/background for the animes listed (anidb-9306 --don’t judge! that’s for my girlfriend-- anidb-11210 and anidb-9980).

I’m a bit at loss to solve that :confused:

Don’t worry about sailormoon, since the third title is a hentai title i trust you and won’t tell anybody…

If you have scanner issues give scanner logs.
If you have agent issue attach agent logs.
I know it is an extremely abstract and complex concept in a developper forum for a beta agent to give me the logs that tells what’s happening so i can troubleshoot… It’s not like i wrote a scanner outputing the library filelist or people have attached agent logs to their post on this thread before, or i even wrote a troubleshooting section in hama readme on github which is displayed when clicking on the agent link in my signature… Oh wait…

I did try all 3 anidbid and posters downloaded just fine… i don’t get paid enough for that… Oh wait…

Please attach agent logs showing the 3 series metadata pull attempt. Rematch the 3 series and it will be in the logs… I need a drink…

Thanks for the reply @ZeroQI ; and my apologies if my previous message was unclear. Since i’m more than a noob when it comes to Plex, i was unsure of what you needed to help me out :slight_smile:

Please find attached com.plexapp.agents.hama.log, Plex Media Scanner.log and Plex Media Scanner (custom ASS).log

As for the drink, should you come to France, i’d gladly offfer you a pint :slight_smile:

2015-08-22 13:38:35,651 (7f3adf7fe700) : CRITICAL (storage:89) - Exception writing to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/Plex/anidb-6662.mp3 (most recent call last):
File “bundles-release/Framework.bundle-dist/Contents/Resources/Versions/2/Python/Framework/components/storage.py”, line 81, in save
IOError: [Errno 13]** Permission denied: ‘/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems/Plex**/._anidb-6662.mp3’

Did you create agent data folders ? If so, you need to change rights because the agent can’t write there
chmod 777 on the folders should solve it…

Indeed, i created the folders. I’ve just chmod them all and it’s perfect now!

Thanks again for your patience @ZeroQI !

Any bug left? how is the tvdb id functionality to display absolute series with seasons in plex ?

Everything’s fine now and i couldn’t spot any bug nor new mistakes from my side.

My only concern left was with Fairy Tail which was not recognized correctly automatically; it retrieved the information for anidb id 6662 instead of 9980.
That’s due to the name of the torrent: [HorribleSubs] Fairy Tail S2 - ## [720p].mkv; in that case “s2” actually refers the season 5+ (this is currently season 6)

I’ve checked on anidb though and the name “Fairy Tail S2” appears correctly for the id 9980 :confused:

Anyway, that was easily correct by changing the info manually

@cm_cakebox: no it’s not because of the filename, only the folder name is used to get the serie name, unless the file are at the root of the library. I did a long time ago take the serie name from the files, but it brought too many issues as some series had different names and it created multiple series to be detected, and most people will label folder name ok and leave filename as is but hardly name all files perfectly and misname the folder…

2015-08-22 11:39:26 “Fairy Tail”
2015-08-22 11:39:26 “Fairy Tail” s0001e070 “[HorribleSubs] Fairy Tail S2 - 70 [720p].mkv”
2015-08-22 11:39:26 “Fairy Tail” s0001e071 “[HorribleSubs] Fairy Tail S2 - 71 [720p].mkv”
2015-08-22 11:39:26 “Fairy Tail” s0001e072 “[HorribleSubs] Fairy Tail S2 - 72 [720p].mkv”

So in short it work as designed and your folder name shouldn’t be called “Fairy Tail” But “Fairy Tail (2014)” or “Fairy Tail S2” to match anidb numbering or like the french would say “Tu as nomme ton repertoire comme une grosse merde mon tit poulet. Je suis du mans originellement mais reste en anglais pour le forum STP”.

It seems the agent works well and surprisingly the scanner too.
Any new functionality needed ?
Somebody created an agent for AMV videos: https://forums.plex.tv/discussion/123409/anime-music-videos-amvs-scanner#latest but for some reason he calls it a scanner… weird… some of you might appreciate…

Hello,
This agent seems to work as my metadata get updated (like years), but It can’t find any artworks, and when looking in my com.plexapp.agents.hama.log, I can see this : (I downloaded your git master.zip this morning)

CRITICAL (agentkit:1057) - Exception in the update function of agent named ‘HamaTV’, called with guid ‘com.plexapp.agents.ha
ma://anidb-9541?lang=en’ (most recent call last):

File “/home/work/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/init.py”, line 525, in anidbCollectionMa
pping
for element in AniDB_collection_tree.iter(“anime”):
AttributeError: ‘NoneType’ object has no attribute ‘iter’

Use the latest zip i attached to thread and update agent and scanner code. I believe you used ild version

@ZeroQI For some reason it didn’t pick up every ‘Omake’ as special.

WORKS:
“Maria-sama ga Miteru” from foldername: “Maria-sama ga Miteru/Season 1”, Season: “1”
“Maria-sama ga Miteru” s0000e501 “[GrimRipper]Maria_Watches_Over_Us_Omake01(C7D43BD4).mkv” “Watches Over Us Omake01”

NOT WORKING:
“Maria-sama ga Miteru” from foldername: “Maria-sama ga Miteru/Season 2”, Season: “2”
“Maria-sama ga Miteru” s0000e002 “[GrimRipper]Maria_Watches_Over_Us_S2_Printemps_Omake01(B7A4D05A).mkv” “5” “Printemps Omake01”

“Maria-sama ga Miteru” from foldername: “Maria-sama ga Miteru/Season 4”, Season: “4”
“Maria-sama ga Miteru” s0004e001 “[Toe-ko]_Maria-sama_ga_Miteru-4th-Omake_01[38d1e057].mkv”

The actual season episodes do get scanned correctly tho.

Here’s a few more miscatches:

“Zoids” from foldername: “Zoids/Season 5”, Season: “5”
“Zoids” s0005e001 “[T-N]Zoids_Genesis_-01[72FAD1E7].avi"

“Zoids” s0000e501 "[T-N]Zoids_Genesis
-31[9DCCACD3]CM.avi" “Genesis - 31CM”
“Zoids” s0000e502 "[T-N]Zoids_Genesis
-32[2B8B3C04]CM.avi" “Genesis - 32CM”
“Zoids” s0000e503 "[T-N]Zoids_Genesis
-47[C3E5C322]andCM.avi" “Genesis - 47andCM”
“Zoids” s0000e504 "[T-N]Zoids_Genesis
-_48[529E3FC3]andCM.avi” “Genesis - 48andCM”

Probably because of the CM at the end of the original filenames.

Probably cannot do anything about these, maybe catching ‘Opening’ earlier in the hits:
“White Album” from foldername: “White Album/Season 2”, Season: “2”
“White Album” s0000e151 “[UTW]White_Album_2-Creditless_Ending[BD][h264-1080p][FLAC][F43094FA].mkv” “7”
“White Album” s0002e001 “[UTW]White_Album_2-_Creditless_Opening_Ver.1[BD][h264-1080p][FLAC][670678D0].mkv”
“White Album” s0002e002 “[UTW]White_Album_2-_Creditless_Opening_Ver.2[BD][h264-1080p][FLAC][39C693A2].mkv”
“White Album” s0002e002 “[UTW]White_Album_2-Picture_Drama_1-Kazusa_Ver.[BD][h264-720p][FLAC][2FB5B991].mkv” “10” “Picture Drama 1 - Kazusa Ver”
“White Album” s0002e002 “[UTW]White_Album_2-Picture_Drama_1-Setsuna_Ver.[BD][h264-720p][FLAC][2084761F].mkv” “10” “Picture Drama 1 - Setsuna Ver”

“Magical Girl Lyrical Nanoha” from foldername: “Magical Girl Lyrical Nanoha/Season 3”, Season: “3”
“Magical Girl Lyrical Nanoha” s0000e501 “[Coldlight]_Mahou_Shoujo_Lyrical_Nanoha_StrikerS_01v3a_DVD[H264][2217D577].mkv” “Mahou Shoujo StrikerS 01v3a”
“Magical Girl Lyrical Nanoha” s0003e002 “[Coldlight]_Mahou_Shoujo_Lyrical_Nanoha_StrikerS_02v2_DVD[H264][3D3377D1].mkv”

“Magical Girl Lyrical Nanoha” s0000e502 “[Coldlight]_Mahou_Shoujo_Lyrical_Nanoha_StrikerS_05v2a_DVD[H264][2905FB17].mkv” “Mahou Shoujo StrikerS 05v2a”

“Magical Girl Lyrical Nanoha” s0003e026 “[Coldlight]_Mahou_Shoujo_Lyrical_Nanoha_StrikerS_26_Final_DVD[H264][71B6330D].mkv” “Final”

Deathnote E36 filename puts up a warning:
Warning - show: ‘Death Note’, s01e036-001, file: ‘/Anime/Death Note/Death Note S01E36 1.28[Virus123][x264][DVD][Dual Audio][88EAB7DF]v2.mkv’ has ep1 > ep2, or show empty
2015-08-26 17:41:28 “Death Note” s0001e036 “Death Note S01E36 1.28[Virus123][x264][DVD][Dual Audio][88EAB7DF]v2.mkv” “1” “28V2”

Since the episode title is “1.28”

“Cowboy Bebop”
“Cowboy Bebop” s0001e001 “Cowboy.Bebop.S01E01.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e002 “Cowboy.Bebop.S01E02.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e003 “Cowboy.Bebop.S01E03.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e004 “Cowboy.Bebop.S01E04.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e008 “Cowboy.Bebop.S01E05.1080p.BluRay.x264-RedBlade.mkv” “1” “0p -RedBlade”
“Cowboy Bebop” s0001e006 “Cowboy.Bebop.S01E06.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e007 “Cowboy.Bebop.S01E07.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e008 “Cowboy.Bebop.S01E08.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e009 “Cowboy.Bebop.S01E09.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e010 “Cowboy.Bebop.S01E10.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e011 “Cowboy.Bebop.S01E11.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e012 “Cowboy.Bebop.S01E12.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e013 “Cowboy.Bebop.S01E13.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e014 “Cowboy.Bebop.S01E14.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0000e001 “Cowboy.Bebop.S01E15.1080p.BluRay.x264-RedBlade.mkv” “5” “E -RedBlade”
“Cowboy Bebop” s0001e016 “Cowboy.Bebop.S01E16.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e017 “Cowboy.Bebop.S01E17.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e018 “Cowboy.Bebop.S01E18.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e019 “Cowboy.Bebop.S01E19.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e020 “Cowboy.Bebop.S01E20.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e021 “Cowboy.Bebop.S01E21.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e022 “Cowboy.Bebop.S01E22.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e023 “Cowboy.Bebop.S01E23.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e024 “Cowboy.Bebop.S01E24.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”
“Cowboy Bebop” s0001e208 “Cowboy.Bebop.S01E25.1080p.BluRay.x264-RedBlade.mkv” “1” “0p -RedBlade”
“Cowboy Bebop” s0001e026 “Cowboy.Bebop.S01E26.1080p.BluRay.x264-RedBlade.mkv” “1” “RedBlade”

Has some strange errors tho. Don’t know why those few episodes are confusing the scanner.

Also, what do you think about catching “Picture Drama” as specials. I have a bunch of series with them and usually I just get rid of them or move them out to Specials manually, but after thinking about it, are there reasons why not just catch them as specials?