Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements and Fixes from last commit #11

Closed
EndOfLine369 opened this issue Mar 24, 2016 · 43 comments
Closed

Enhancements and Fixes from last commit #11

EndOfLine369 opened this issue Mar 24, 2016 · 43 comments

Comments

@EndOfLine369
Copy link
Collaborator

In response to my other issue ticket "ZeroQI/Hama.bundle#24"

https://gist.github.com/EndOfLine369/20159a2480502f0839fc/revisions
Linked file is based off of a 2016-03-21 pull.

If you agree on my changes, i'll create a fork for the changes so you can just pull into the master.

Here is my list of enhancements:

  1. Addition to "ignore_dirs_rx" for folders added by QNAP
    '@Recycle', '.@__thumb'
  2. Addition to "whack_pre_clean"
    "(Clean)"
  3. Addition to "LOG_PATHS" for QNAP
    '/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Logs', # QNAP
  4. Enhancement of "Capture title from anidb.id or use folder name," section as it was only pulling the absolute numbering info if there is no "(anidb|tvdb|tmdb|imdb)" tag in the 'folder_show' variable and also adds in the tvdb format to the folder name as the 'tvdb.id' file is seen. This has been split into two parts (1) a section where all it does is pull out the number from available series number files and puts into the 'folder_show' variable (2) if an "absolute_numbering.list" file is seen in the folder, use the available anidb number (gets the corresponding tvdb number from the 'anime-list-master.xml') or tvdb number in the folder name and then does the previous setup of querying the 'thetvdb.com' api for series info.

Here is my list of fixes:

  1. Fix to 'add_episode_into_plex' so it would not interpret S0E17 as S1E17 and mess up all Special (season 0) episodes when using absolute numbering.
  if tvdb_mapping and ep  in tvdb_mapping and season != 0:                 season, ep  = tvdb_mapping[ep ]
  if tvdb_mapping and ep2 in tvdb_mapping and season != 0:                 season, ep2 = tvdb_mapping[ep2]
  1. In the "File Main loop"->"### Ep not found, adding as season 0 episode 501+ ###" it was incorrectly renaming the show name causing random specials to be split out from the main series listing.
@ZeroQI
Copy link
Owner

ZeroQI commented Mar 24, 2016

Wow, that is a descriptive feedback, nice to see after a bunch of reports where people didn't select my scanner or installed my agent wrong and flooded the forums... Why closing the issue already though ?
Enhancement 1 to 3 definitely. The path list need to be as complete as possible. i wish i could just piggy back easily into Plex logs folder but that is all i could hack to re-use the folder

Fix 1: If somebody force a tvdbid in folder name or in a tvdb.id file in series folder or Extras folder inside it, it build a mapping list (abs ep number => (season, ep)) to make the absolute series show up with seasons, and is converted just before adding the files. If serie is split in seasons, it is in tvdb mode and i think i didn't account for season folders and tvdb,id forced. maybe i should put tvdbabs-xxxxxx to take tvdbid and let know there is a need for mapping or not. you fix isn't bad in that regards but better not mapping if not needed

Write
Fixes 2 (listed twice number 1) didn't know i had this bug so definitely...

Thanks for really useable fixes
Looking at ZeroQI/Hama.bundle#25 now

@ZeroQI ZeroQI closed this as completed Mar 24, 2016
@EndOfLine369
Copy link
Collaborator Author

Looks like you committed all my changes =)
Nice 👍
No code is perfect and i'm all for assisting in code dives. Hope the gist code info made it easier for you as well for seeing the diffs. And yeah, by looking for a specific 'absolute_numbering.list' file, it will only pull mapping info with URL queries when clearly requested and not every time a tvdbid is pulled from a tvdb.id file which could be taxing depending on people's setup.

@ZeroQI
Copy link
Owner

ZeroQI commented Mar 25, 2016

I have to rewrite the tvdb seasons used for absolute series:
. Anidb-xxxxx for absolute series
. Tvdb-xxxxx for season series
. Tvdb2-xxxxx for abs series displayed as season folders
This will enable tvdb season conversion mode and load the mapping file on the given tvdbid. I see no need to load scudlee's xml for now. I will put a variable anidb_tvdb_conv to True and convert tvdb2-xxxxx to tvdb-xxxxx to reduce complexity...

@ZeroQI ZeroQI reopened this Mar 25, 2016
@EndOfLine369
Copy link
Collaborator Author

Are you talking about the optional files 'tvdb.id' and [tvdb-xxx] in the folder names getting these additional options? That would still not resolve the need to not load scudlee's xml. The only point it will ever need to load the xml to get the tvdb id for the tvdb api call when the anidb # is used. If the tvdb id is present, it dosn't even bother with the xml anyway and just directly goes to the tvdb api.

It is the anidb->tvdbid conversion requiring scudlee's xml that is not being solved with this proposal. The only thing this would replace is the need for an 'absolute_numbering.list' file in replace for using 'Anidb-xxxxx' or 'Tvdb2-xxxxx' in the folder name or a separate id file.

@ZeroQI
Copy link
Owner

ZeroQI commented Mar 25, 2016

I am sorry but i don't understand what you mean. Double negative didn't help...
I do not see the need to use the anidbid if using tvdb seasons on absolute numbering.
My implementation could allow hybrid numbering too (tvdb3-xxxx) with seasons but eps keeps the absolute numbering...

@EndOfLine369
Copy link
Collaborator Author

I think I get you now. You basically want to require people to specify the tvdbid if they want to use the abs->season ability. Thus bypassing the need to poll scudlee's xml with these two options.

(1) use 'tvdb2-xxx' if they have episodes in abs numbers but want it added into plex as seasons and numbers reset to ep 1 on season change.

EX (for a 3ep first season): 
files: 1 / 2 / 3 / 4 / 5  =>  plex: s1e1 / s1e2 / s1s3 / s2s1 / s1e2
metadata.id = 'tvbd2-xxxx'

(2) use 'tvdb3-xxx' if they have episodes in abs numbers but want it added into plex as seasons and numbers NOT reset to 1

EX (for a 3ep first season): 
files: 1 / 2 / 3 / 4 / 5  =>  plex: s1e1 / s1e2 / s1s3 / s2s4 / s1e5
metadata.id = 'tvbd3-xxxx'

These ids can also then be added into the new numbering if statement section for tvdb_table i proposed in the Hama issue ticket. Correct?

@ZeroQI
Copy link
Owner

ZeroQI commented Mar 27, 2016

Yes.
I detect automatically seasons but when forcing conversion modes to displaysomething different from what is on disk, the above would be the most simple.

I am unsure i can code easily the mode 3 which is seasons but absolute numbering for episodes, nor if i should encourage people not wanting to follow the naming convention of anidb or tvdb but i see the attractiom of that hybrid mode due to the un-ease of 100+ eps in plex and the simplicity of the abs numbering. Will code it when am vack from japan or if i have time before

@ZeroQI
Copy link
Owner

ZeroQI commented Mar 28, 2016

please test https://gist.github.com/ZeroQI/26d26f91af04c876b1a0
Cannot test myself, my plex server is not accessible since i updated it until i come back to ireland

@EndOfLine369
Copy link
Collaborator Author

Here is what I have at the moment https://gist.github.com/EndOfLine369/20159a2480502f0839fc
Still testing.

But just to comment on your code:

  • you have not predefined (guid, tvdb_mapping)
  • if the id is not pulled from a file, guid will not be defined for the table creation section
  • if guid is set, it could be carriying over a different id other than a tvdb one
  • your tvdb_mode could be seeing incorrect sections of the folder string for setting the value
  • folder_show should not have tvdb2/3 replaced back to tvdb. this will need to be left as is for later hama interpretation of how to organize metadata by episodes

@EndOfLine369
Copy link
Collaborator Author

Made a corresponding update to the Hama init file to handle the addition of tvdb2/3
https://gist.github.com/EndOfLine369/8ee08c812a5f3943e6cc
I'm not seeing any issues myself in the above scanner code. And with this hama code, it is populating the metadata correctly.

@sven-7
Copy link
Collaborator

sven-7 commented Mar 30, 2016

Just jumping in to comment and see if this proposed fix will handle the Absolute Numbering / Season issue I've been having.

With a lot of the long-running anime shows I have (example: Detective Conan, One Piece, even Dragon ball Super) I've had issues with no metadata appearing. I have all of these shows with Absolute Numbering, but I've split them into different season folders on my harddrive. With shows like DC and OP, having 700+ episodes in one folder is a little overwhelming. I've split up the "season" folders in accordance to TVDB's definition of each shows season. What I don't do is rename the shows to the "S04E01" format, as I'd like to keep the absolute numbering that is commonly associated with anime.

Despite doing this, I do not tend to get any metadata, titles, etc... after the first season. This stays true whether I use Hama or TVDB as my Agent.

Will these proposed fixes move towards fixing this issue?

@EndOfLine369
Copy link
Collaborator Author

Hi @sven-7, that is correct.
If you want to test my updates to the scanner & hama as well, feel free 😄 . As it is always good to have more testers than just ZeroQI and myself. Make sure to take a backup of your existing code so if you see issues so you can revert to your prev working code.

"Absolute Series Scanner.py" https://gist.github.com/EndOfLine369/20159a2480502f0839fc
"init.py" https://gist.github.com/EndOfLine369/8ee08c812a5f3943e6cc

Update your files and then in your folders where you want it to interpret the absolute numbering, either put in the series' folder name one of the below "[tvdb2-xxx]"/"[tvdb3-xxx]" or the id in a corresponding "tvdb2.id"/"tvdb3.id" file with the tvdb number in it.

(1) use 'tvdb2-xxx' if you have episodes in abs numbers but want it added into plex as seasons and numbers reset to ep 1 on season change.

EX (for a 3ep first season): 
files: 1 / 2 / 3 / 4 / 5  =>  plex: s1e1 / s1e2 / s1s3 / s2s1 / s1e2

(2) use 'tvdb3-xxx' if they have episodes in abs numbers but want it added into plex as seasons and numbers NOT reset to 1

EX (for a 3ep first season): 
files: 1 / 2 / 3 / 4 / 5  =>  plex: s1e1 / s1e2 / s1s3 / s2s4 / s1e5

@sven-7
Copy link
Collaborator

sven-7 commented Mar 31, 2016

Thanks, @EndOfLine369.

I've applied the Scanner and Agent updates and have started testing with a few different series.

Question on the TVDB corresponding ids. Where I'm using the latter example, do you want the "tvdb3-xxx" to have the Series ID or Season ID? Does an ID file have to be placed within the top-level series folder or one in each of the corresponding season folders?

Example 1: Dragon Ball Super TVDB Series ID: 295068

Example 2: Dragon Ball Super TVDB Season 2 ID: 644129

Another question -- is it best practice to have the seasons split into folders manually or let the scanner/agent determine the seasons by what TVDB has defined them as? Currently, again using Dragon Ball Super as an example, I have the 36 or so episode files split into the three season folders as defined by TVDB.

I'll continue to test this later today with additional an additional series.

@EndOfLine369
Copy link
Collaborator Author

It would be the series id only and just in the top level folder.

EX: 
"Dragon Ball Super [tvdb3-295068]" / "Season 1" / <episode_files>
or
"Dragon Ball Super [tvdb3-295068]" / <episode_files>

If the folders under the main series folder are not a specific naming format, they are ignored so leave the sub folders as "Season " format for them to be seen.

season_rx = [                                                           ### Seasons Folders 
 'Specials',                                                            # Specials (season 0)
 '(Season|Series|Book|Saison|Livre|S)[ _\-]*(?P<season>[0-9]{1,2}).*',  # Season ##, Series #Book ## Saison ##, Livre ##, S##, S ##
 '(?P<season>[0-9]{1,2})a? Stagione.*',                                 # ##a Stagione
 '(([Ss]tory )?[Aa]r[kc]|[Vv]ideo).*' ]                                 # Last entry in array, folder name droped but files kept: Story, Arc, Ark, Video

It should not matter if the episode files are all in the top series folder or split into child season folders. As i can add in a ( "Season 1" / "EP451" ) file but the scanner still put it in as season 21 in Plex. This is because by using the 'tvdb2'/'tvdb3' options are telling the scanner to ignore any found or not found season info via folders and override it with the season# defined in TVDB for that absolute episode #.

@sven-7
Copy link
Collaborator

sven-7 commented Mar 31, 2016

Okay, that's what I assumed. Thanks. I've attempted this a few different ways, but typically having no success.

  1. If I take another show (Get Backers - 79056 - Absolute Numbered - 49 episodes in one folder) and had no success. For this case, it all imports as one season (I've labeled the Top Level folder as Get Backers [tvdb3-79056]) instead of the two that TVDB has it defined as. It should also be noted that no TVDB Summaries are being imported either.
  2. With the Dragon Ball Super test case, if I do the same as above, I get the same result. It all shows up as one season and says all TVDB summaries are missing.
  3. If I separate it manually into three separate folders, with the top level labeled with the tvdb3 tag, it will import it as three seasons, with TVDB summaries for the first season only. The second and third season do not appear to have any metadata associated with them.

@EndOfLine369
Copy link
Collaborator Author

Just to make sure there is no confusion on the setup, as you mentioned you were trying different agents. Can you please make sure that your using Hama agent and ASS scanner on the library your testing this out on as this sounds like the TVDB agent and plex scanner.

The location of the files above should have been:
Plug-ins/Hama.bundle/Contents/Code/__init__.py
Scanners/Series/Absolute Series Scanner.py

Can you please provide your log files:
Logs/Plex Media Scanner (custom ASS).log
Logs/PMS Plugin Logs/com.plexapp.agents.hama.log

@sven-7
Copy link
Collaborator

sven-7 commented Mar 31, 2016

Yep -- I placed your versions in both locations (and did so again today to be sure).

Here are the logs....

logs.zip

@EndOfLine369
Copy link
Collaborator Author

Looks like your scanner is not updated as I don't see these entries in your scanner log on "TVDB season mode".

EX:
2016-03-30 21:59:21 Scanner call - root: '/share/TV Shows', path: 'Red vs Blue [tvdb3-78896]', dirs: '3', files: '112'
2016-03-30 21:59:21 =============================================================================================================================================================
2016-03-30 21:59:21 folder_show = 'Red vs Blue [tvdb3-78896]'
2016-03-30 21:59:21 tvdb id = '78896'
2016-03-30 21:59:21 TVDB season mode (3) enabled, serie url: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/78896/all/en.xml'
2016-03-30 21:59:22 "Red vs Blue [tvdb3-78896]" s0001e001 "RvB_EP01_HiRes.mov" "HiRes"

Also your Hama is seeing issues as well. Probably as folders under the "DataItems" were not created for the metadata agent?

IOError: [Errno 2] No such file or directory: u'\\\\?\\C:\\Users\\Sven\\AppData\\Local\\Plex Media Server\\Plug-in Support\\Data\\com.plexapp.agents.hama\\DataItems\\TMDB\\._tt1528406-art.jpg'

The output from the agent logs also show an issue in your naming.

2016-03-31 15:21:54,825 (330) :  INFO (logkit:16) - File: 's3e32' 'A:\Anime Series\Dragon Ball Super [tvdb3-295068]\Season 03 [tvdb3-650773]\Dragon Ball Super - 32 - The Matches Begin! Everybody Heads to the Nameless Planet!.mkv'

should be A:\Anime Series\Dragon Ball Super [tvdb3-295068]\Season 03\

The scanner not being updated could have some knock on effects of the hama agent. There is also one instance I am see that should have been loaded right in log.2 where it was loading right but then was reloaded as single anidb season with some dual searches for 'Dragon Ball Super' & 'Get Backers' at the same time. Could be you were trying to do things in multiple browser tabs and they were overlapping eachother? Could also be causing your above IO issue.

@sven-7
Copy link
Collaborator

sven-7 commented Mar 31, 2016

I'll try replacing the scanner once more.

Suggestions on the Scanner not updating? I've replaced the old one several times. I'll try once more now.

Looking at the Hama Guide -- it doesn't call for the creation of "TMDB" does it? Only TVDB, I thought. Here is what the current file structure looks like....

files

Yes, the latter you're right. That was a test on my part (prior to your response earlier) about using Season IDs.

I had a separate test library going where DB Super and Get Backers were loaded. I've since deleted that, but it's possible it was called on accident in a separate browser window.

@EndOfLine369
Copy link
Collaborator Author

On the scanner, remove the '.pyc' file Scanners/Series/Absolute Series Scanner.pyc (compiled python file). It could be your python install is not recognizing it needs to recompile the scanner file. Any more than this, and it still does not work for you, I think we will need to wait for ZeroQI to get back from Japan to test as well.

@sven-7
Copy link
Collaborator

sven-7 commented Mar 31, 2016

Oddly enough...there is no .pyc in the Series folder. There is one for the Scanner in the Movies folder (and it created a new one after I replaced that ASS as well). This could be the issue?

movies

series

Here is what both files look like after I replaced the Scanner and started Plex back up.

On second thought...I might need to entirely remove the Scanner from the Movies section. That could be the issue here. (I don't compile Anime Movies and Series in the Plex series-style library) -- I also decided to use the Plex movie scanner for that, so this is now irrelevant being here anyway.

@sven-7
Copy link
Collaborator

sven-7 commented Apr 1, 2016

Okay -- after some work, the new scanner seems to be up and running. I cleared out the logs and here is what's happening:

New Logs.zip

You'll see Log Horizon and Detective Conan are being...disagreeable. That seems to be due to having child season folders. Upon first scan, Dragon Ball Super did the same thing. When I put them all into one directory, tvdb3 mode activated and separated them.

@EndOfLine369
Copy link
Collaborator Author

So once you made folder changes after you corrected the scanner file it did it correctly? That is probably due to Plex behavior I don't exactly understand. If a scan is performed on a library but a folder has not been touched, it will probably be skipped over in a scan (but not always). Once you moved files around in the folder (could also change the folder name) it saw a change and scanned the files and put them in as separated seasons.

@sven-7
Copy link
Collaborator

sven-7 commented Apr 1, 2016

Yep - exactly. Once I took (back to DB Super) the three seasons and combined them all under the parent DB Super folder (tvdb3), Plex split them up into three seasons on its own.

Definitely seems consistent. I'm doing it one-by-one and where I have a parent folder labeled, but seasons within it, it'll skip and move on. Once I change it, it'll import correctly and is grabbing the right metadata from TVDB as well. (I've confirmed this since I did it for a show I did updates on myself today)

I've tested a tvdb2 as well and that seems to be working (aside from the occasional Plex driven hiccup).

Thanks for all your help, by the way.

@sven-7
Copy link
Collaborator

sven-7 commented Apr 1, 2016

More or less been having success with the series scanning in correctly. I'm only getting partial metadata it seems. I.e. I am getting episode descriptions, but no directors, writers, producers, etc.. are coming through. This is probably related to Hama, correct?

@MagellanSails
Copy link

Jumping in a little late, but I'm seeing the same things as @sven-7. I've been using tvdb3 mostly and had success with the absolute numbers staying and episodes being split into seasons. Also the descriptions are showing up.

The issue is the directors, writers, etc don't show up. The tvdb api calls seem correct and the xml coming back has everything in it, but it gets dropped somewhere along the way. I'll post some logs later tonight.

Looking great so far though, thanks!

@EndOfLine369
Copy link
Collaborator Author

Looks like it is not a bug but an enhancement. In the TVDB section in Hama, it does not pull that info to insert into Plex.

@EndOfLine369
Copy link
Collaborator Author

Looks like the mapping update to handle tvdb2/3 broke summary info for 'anidb-' series. As even though it pulls in anidb info, but it still relies on tvdb for episode summaries. Will see what I can do to fix.

Update: To clarify, 'anidb-xxx' series where files are not split into seasons and are all abs numbering in a single folder. If 'anidb-xxx' is used but files are split into multiple seasons, it will not be an issue as Hama no longer sees those as anidb and parses them in TVDB seasons mode.

@EndOfLine369
Copy link
Collaborator Author

Updated "init.py" - https://gist.github.com/EndOfLine369/8ee08c812a5f3943e6cc

Has these in it from prev:

@sven-7
Copy link
Collaborator

sven-7 commented Apr 2, 2016

After the latest version/fix, the info seems to be pulling in correctly now. Nice!

@ZeroQI
Copy link
Owner

ZeroQI commented Apr 2, 2016

Thanks for that, EndOfLine369.

i was away for 2 weeks in japan and my plex server became inaccessible after a remote update...
I just came back to ireland (am french by the way), all i could do was amend the scanner but left quite few issues, i apologise...]. I can follow more activelly now

i know you fixed it in the end on both scanner and agent. i was mitigated on the use of the hybrid mode but had been thinking about it for a while.... You left the tvdb2 in the guid which i didn't want to do, but there was to me no way to make the agent work 100% with the default tvdb-xxxxxx guid... That was the only easy way...

You seem pretty prolific EndOfLine369 so If you want explanations on some parts of the code let me know.

You do seem to know your way around the code though... That was my first project with Hama and i code the shortest i can, but it may appear a bit hectic to people with proper coding formation...

Do you want to do a proper fork ? i applied the changes in the meantime on both scanner and agent and credited you...

If you have other improvement suggestions, let me know

@sven-7
Copy link
Collaborator

sven-7 commented Apr 2, 2016

Hi @ZeroQI, welcome back!

Before any commits, I just wanted to give one last update. I've put this to a full test with most cases in my library that would require usage of tvdb2 or tvdb3 -- and I'm using both on a case-by-case basis.

For example, I'm using tvdb3 for many of the long, continuous series like One Piece, Detective Conan, etc...

I've found that tvdb2 is great for other shows that are multiple cour, but not necessarily continuous like the ones above are. Some examples here are: Sword Art Online, Log Horizon, Ace of Diamond. This gives the nice ability to have the shows cleanly wrapped up into one series versus having multiple series for Sword Art Online and Sword Art Online II.

@EndOfLine369 -- have you had any experience in your testing with specials? I have all 700+ episodes of One Piece getting pulled in !00% perfectly now (which I have yet to see successfully before now), but I decided to add some specials as well and it's not taking it very well.

I have all episodes of One Piece absolute numbered, but the specials don't exactly have that. I went with the "One Piece - S0EXX" or "One Piece - 0xXX" format, but they're not mapping. Not a big deal, by all means, but just wanted to let you know.

Overall, the only major issue I've seen was with Lupin III. Currently, TVDB doesn't have them all absolute numbered, which in turn kind of breaks the series up in a weird way. I ended up leaving it as separate series and syncing the standard way with AniDB. Though...Plex continually tries to combine them into one. I manually matched them all with their respective AniDB ID.

Happy to provide any logs or anything you might need. While I don't know my way around code, I'm more than happy to be a tester for this. Great work everyone!

@ZeroQI
Copy link
Owner

ZeroQI commented Apr 2, 2016

create an account on tvdb and edit/complete the absolute numbering?
does the specials work in anidb and tvdb mode? Or is it only tvdb2 and tvdb3 impacted ?
Can i have an exemple of an episode number and filename ? is the special mapped through ScumLee's XML mapping files ?

@sven-7
Copy link
Collaborator

sven-7 commented Apr 2, 2016

Unfortunately, the series are locked. Renumbering is being discussed in the forums, and it should happen eventually, but it's just something that has to be worked around for now I think.

So, looking at this -- it might only be the tvdb3 that causes problems here. For One Piece, I have it set to tvdb3. It pulls in all 734 episodes and separates them out into seasons, with metadata, just fine. It's the Specials that are getting caught up. My thought it because it doesn't know what to do with them as they have no absolute numbering? An example is S0E33 - Adventure in Nebulanda (http://thetvdb.com/?tab=episode&seriesid=81797&seasonid=31892&id=5487690&lid=7). In AniDB, it's defined as Special 22.

In two series that I have mapped to tvdb2, the specials seem to be fine. Perhaps that is because tvdb 2 allows a renumbering of episodes in each season? Wagnaria!! (http://thetvdb.com/?tab=season&seriesid=145211&seasonid=201131&lid=7) all shows up fine, all three seasons and the special. The same with The World God Only Knows (http://thetvdb.com/?tab=season&seriesid=195711&seasonid=330571&lid=7). Both series and their specials are populating/mapping the metadata correctly.

@sven-7
Copy link
Collaborator

sven-7 commented Apr 2, 2016

I've also tried both naming conventions for the episode (TVDB - S0E33 and AniDB - S0E22).

Here are my logs:

Logs.zip

@EndOfLine369
Copy link
Collaborator Author

I am able to replicate. I have put these episodes under tvdb3 & tvdb2:

[HorribleSubs] One Piece S00E19 - 3D2Y - 01 [480p].mkv
[HorribleSubs] One Piece SP21 - Episode of Sabo - 01 [480p].mkv
  • Under tvdb2, it is pulling in the special meteadata.
  • Under tvdb3, it is NOT pulling in the special meteadata.

Updated "init.py" - https://gist.github.com/EndOfLine369/8ee08c812a5f3943e6cc

  • Fix to tvdb3 not loading metadata for specials
  • Try/Except encapsulation of the TVDB summary mapping section from anidb setup

@EndOfLine369
Copy link
Collaborator Author

@ZeroQI if your ok with the last fix from this thread, I think we can close this ticket out. Any further issues can be raised in new issues tickets.

I've also only been on GitHub a little over a month for your awesome Plex code that you've spent a long time on. I don't exactly know how to use this site yet and only found Gist a fortnight ago. So i'm all for keeping all updates in the main base you own and not a fork to allow everyone to benefit. As well as helping you out if wanted 😄. If you want me to provide Gist links or Forks for you to pull in if I help out in the future, just let me know.

@sven-7
Copy link
Collaborator

sven-7 commented Apr 3, 2016

@EndOfLine369 success here as well. Had to name the specials with TVDB's numbering since they don't match up, but it's all pulling down successfully. Thanks!

@EndOfLine369
Copy link
Collaborator Author

@ZeroQI : Noticed that directors/writers/producers were getting added in multiple times.

Updated "init.py" - https://gist.github.com/EndOfLine369/8ee08c812a5f3943e6cc
Since your last commit of my updates to the master, now contains:

  • Random int case issues in the anidb's TVDB summary mapping section requiring a try/except encapsulation to still let all other info still be loaded into metadata.
  • "tvdb3" specials were not loading metadata due to issues in numbering setup as specials have no absolute number in TVDB. So season 0 had to be put back to episode number instead of absolute number for every other season in "tvdb3" setup.
  • director/writer/producer setup was duplicating names in Plex if a manual update was called post Plex addition initial update as python set's add command was called. An addition of a set.clear() for each string set was added. In addition, an extra precaution of checking that the person was not already seen in case names might have been added in twice in TVDB/AniDB or a clear did not work.

@sven-7
Copy link
Collaborator

sven-7 commented Apr 4, 2016

I'm also having trouble with Hellsing Ultimate's specials pulling in (and two episodes disappear). It looks like the scanner is registering them, but they disappear along the way.

Hellsing Logs.zip

@EndOfLine369
Copy link
Collaborator Author

I mirrored your file names and tested. I found there was a minor type issue on a test that was causing mapping to be wrong for metadata to be seen. please re-pull my "init.py" and retest.

On items disappearing, I don't see that happening as once the scanner sets the season and episode number it is fixed. The only thing that could make it disappear is it gets associated with a different show. But even then, you should be able to find it potentially as a duplicate episode.

@sven-7
Copy link
Collaborator

sven-7 commented Apr 5, 2016

Yes - you're right. Something was happening with Hama. Looking at the logs, it wasn't loading the plug-in code.

Anyway -- Looks like it's importing correctly now (I had to set it to tvdb2), with metadata. Where episodes 6/7 were doubling up earlier with 8/9, it seems to be fully importing.

@ZeroQI
Copy link
Owner

ZeroQI commented Apr 5, 2016

OK closing, reopen this or new one if needed, thanks a lot EndOfLine369, you made it possible, and thinking back, this is the only agent supporting that and that is cool :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants