Series Better ABsolute Scanner (S - BABS)

Got you now. i looked for an agent with just htat feature: https://forums.plex.tv/topic/38402-metadata-agents-for-exported-xbmc-library/
From there, i looked how he did and got the following:
tvdb_id = os.path.join(os.path.dirname(String.Unquote(media.filename).encode('utf-8'), "tvdb.id")
if os.path.exists(tvdb_id): episode_num = el_text(episode_el, 'absolute_number')
else: episode_num = el_text(episode_el, 'EpisodeNumber')

That should keep you going

Got you now. i looked for an agent with just htat feature: https://forums.plex.tv/topic/38402-metadata-agents-for-exported-xbmc-library/
From there, i looked how he did and got the following:
tvdb_id = os.path.join(os.path.dirname(String.Unquote(media.filename).encode('utf-8'), "tvdb.id")
if os.path.exists(tvdb_id): episode_num = el_text(episode_el, 'absolute_number')
else: episode_num = el_text(episode_el, 'EpisodeNumber')

That should keep you going

the code generate this error:

File "/root/Library/Plex Media Server/Plug-ins/TheTVDB_ABS.bundle/Contents/Code/__init__.py", line 590, in UpdateEpisodes
    tvdb_id = os.path.join(os.path.dirname(String.Unquote(media.filename).encode('utf-8'), "tvdb.id"))
AttributeError: 'MediaTree' object has no attribute 'filename'
 

My own agent: https://github.com/ZeroQI/Hama.bundle/blob/master/Contents/Code/__init__.py

for media_season in media.seasons:
  for media_episode in media.seasons[media_season].episodes:
    for media_item in media.seasons[media_season].episodes[media_episode].items:
      for item_part in media_item.parts:  Log.Debug("File: '%s'" % item_part.file)

So by tweaking you get:

​found = Falsetvdb_id = None
for media_season in media.seasons:
  for media_episode in media.seasons[media_season].episodes:
    for media_item in media.seasons[media_season].episodes[media_episode].items:
      for item_part in media_item.parts:
        found = True
        tvdb_id = os.path.join(os.path.dirname(String.Unquote( media.seasons[media_season].episodes[media_episode].items[item_part] ).encode('utf-8'), "tvdb.id")
        break
      if found: break
    if found: break
  if found: break
if os.path.exists(tvdb_id): episode_num = el_text(episode_el, 'absolute_number')
else: episode_num = el_text(episode_el, 'EpisodeNumber')

WOW now is perfect! ! !

is somebody it's interested to have episode with absolute number but in splited season as in the TVDB site, this is the right code to insert in the TVDB agent. you need to insert tvdb.id file inside of each season folder. if you don't have tvdb.id file the TVDB agent work normally.

import os 
       # Get the season and episode numbers
        season_num = el_text(episode_el, 'SeasonNumber')
        tvdb_id = None
        for media_season in media.seasons:
         for media_episode in media.seasons[media_season].episodes:
          for media_item in media.seasons[media_season].episodes[media_episode].items:
           for item_part in media_item.parts:
            tvdb_id = os.path.join(os.path.dirname(item_part.file).encode('utf-8'), "tvdb.id")
            found = True
            break
            if found: break
           if found: break
          if found: break
         if os.path.exists(tvdb_id):
          episode_num = el_text(episode_el, 'absolute_number')
         else:
          episode_num = el_text(episode_el, 'EpisodeNumber')

thank a lot ZeroQI for the support ;)

Excellent, i am getting good at this :D

Sorry, but could you please update the instruction in the first post? Do I need to edit the __init__.py of the TVDB agent as well?

How to install custom scanner: https://forums.plex.tv/topic/19396-how-to-install-a-custom-scanner/

The agent and scanner are completely separate. Catello wanted to shift the season and episode scheme to something non standard (not normal season numbering, not absolute numbering) so he had to amend the agent to account of the difference. i also wrote the Absolute Series Scanner that seem to work nicely if you want to give it a try...

I have installed the S-BABS scanner and have set it to be used on my Anime which are all in folders like /Series.Name/[FILES] where the files are absolute numbered and tvdb.id files are created and readable in the root of each series.

With Naruto I tried unmatching and matching again, but I only get one season anyway. What am I missing?

my episodes is like OnePIece/One PIece 625.mp4 is working this agent with this filename?

@missekatt: Your data is organised in a single season (ansolute numbering), so if there is no "tvdb.id" file or if it contain anything else after the id like a line feed, it will present the data as they are... it look like the tvdbid file is not named correctly, has extra chars inside or the rights arent right..

@valantislevas: that is an absolute numbering naming convention, so that should be fine.

What should be mentionned, is that S-BABS gives absolutes data, which works perfectly fine with the AbsTVDB.

But there are ofc lots of different ways to do it.

I'm having problems recently, on line 439 of S-BABS, is some metadata server down?

I'm thinking to switch to http://meta.plex.tv instead of the default one, but I'm not sure if it will break things.

This is the error in Plex Media Scanner.log:

Oct 13, 2014 20:24:30 [0x7f56c658b780] ERROR - Error in Python: Running scanner:
Traceback (most recent call last):
  File "/mnt/wdred/homes/plexmediaserver/Library/Application\ Support/Plex Media Server/Scanners/Series/S-BABS.py", line 439, in Scan
    the_season = episode_dict[int(episode_match.group('ep'))][0]
KeyError: (665,)

What I find weird, is the KeyError. The episode is well something with 665 in it, but no "," in episode. Anyone got an idea?

EDIT: Solved, it's a problem of slow mirroring/proxy system from plexapp.com.

To fix it, replace this:

TVDB_PROXY = 'thetvdb.plexapp.com'

by

TVDB_PROXY = 'thetvdb.com'

in your S-BABS.py

This is 100x more complicated than I'd like.  So, I took my JoJo's Bizarre Adventure vids, put them in one folder, and set it to a "home movies" folder in Plex.  Works great, whereas when I set it up as a TV show, it only saw episodes 1-9, 23, and 25.  And all followed the exact same naming convention, just the episode numbers being different...

did you try HAMA my anime scanner, the package include "Absolute Series Scanner" which should handle that right

Hi.

I'm trying to create a new TV Series library for my Anime, and I've put BABS and S-BABS to Plex\Library\Plex Media Server\Scanners\Series in my ASUSTOR AS-202TE. When I try to select the right scanner for the job, I get this error "A scanner is required" http://i.imgur.com/eVCPrCp.png

It happens with both custom scanners, and I'm out of options. Any help would be appreciated.

Are you just using Plex media Server version that just came out: 0.9.12.0.1071 ? is fo have the same issue on synology [PlexMediaServer-0.9.12.0.1071-7b11cfc-x86.spk]... same after removal / reinstall... can't even select hama as agent...

My version is 0.9.11.7.803-87d0708. I can choose a custom agent just fine, custom scanners however do not work.

Plex/web version? is it > 2.4.0 ?

Web version is 2.4.3

Plex/web version? is it > 2.4.0 ?

Web version is 2.4.3

Yeah I'm having the same issue.