[Release] Plex Anime Scanner



Hello all,

The development of this scanner started as my own need. I like to organize my anime collection into seasons but I also like to keep the absolute episode number. I didn't found any scanners that can do this and I started to implement my own.

I have tried the scanner developed by ZeroQI (witch I consider it great), it has a lot of features that mine is still missing, but it didn't covered my folder structure.

Folder Structure

  • Root Folder (the folder that is added as root folder in the Plex library)
    • Anime Name (example: Bleach)
      • Season 1 (example: Bleach.S01.1080p.BluRay.DTS.x264-GROUP)
        • Episode 01 (example: Bleach.001.1080p.BluRay.DTS.x264-GROUP.mkv)
        • Episode 02 (example: Bleach.002.1080p.BluRay.DTS.x264-GROUP.mkv)
        • Episode 03
        • ...
      • Season 2 (example: Bleach.S02.1080p.BluRay.DTS.x264-GROUP)
        • Episode 28 (example: Bleach.028.1080p.BluRay.DTS.x264-GROUP.mkv)
        • Episode 29
        • ...
      • Season 3 (example: Bleach.S03.1080p.BluRay.DTS.x264-GROUP)
        • Episode 56 (example: Bleach.056.1080p.BluRay.DTS.x264-GROUP.mkv)
        • ...
      • ...
    • ...

The scanner will look only 2 levels down, so you need to respect the above folder structure. You can find more details about this on GitHub.

Download: github.com/StancuFlorin/Plex-Anime-Scanner

The scanner will only add the correct seasons and episodes in the Plex library, but in order to get the correct name / summary etc of the episodes you need Hama Agent. ZeroQI made a great job on this one also, but I didn't was able to make it work without few changes. If the changes are valid for Hama, I plan to make a pull request with them.

Changes that I did on Hama:

  • It had a weird check that was not applicable for my case. If you had multiple seasons, Hama was forcing you to use the TVDB numbering mode (of the seasons) even if you want to use AniDB, but I wanted to use the seasons that are created by my scanner.
  • When you use AniDB, the season was always 1, so I had to do some changes to get the correct season of the episode from Plex library.
  • Also, even if you use AniDB for episodes, the summary was still taken from TVDB. I changed it to take the summary from AniDB.
  • All the changes can be found here github.com/ZeroQI/Hama.bundle/compare/master...StancuFlorin:master

Download: github.com/StancuFlorin/Hama.bundle


Few images of the final result


I stumbled across this looking for a solution as any show above 100 episodes assumes the 100+ episodes belong in Season 1. Unfortunately while the metadata is the same, the sorting is problematic. Any recommendations short of renaming all of the files to fit a SxxExx format?


You don't need to rename all the files to fit the SxxExx format. You only make folders for each season and add the episodes for that season there.

The files for each season should not start again from episode 1, you can keep the absolute episode numbering like it is on AniDB.

For example: If the season 1 has 32 episodes, you need to add the first 32 episodes to a folder that fit S01 and the files for season 2 in a folder that fit S02. The episodes for season 2 should start from episode 33 (like it is in AniDB)

The files should not contain the season number. They should contain only the episode number.

If you have any other questions please ask :)


So if i get it right, your season folders look like: Bleach.S01.1080p.BluRay.DTS.x264-GROUP which even plex series scanner will not handle and instead of actually renaming it , you create your own scanner using this season regex:

    regexSeason = '(?P<show>.*?)[\._\- ]+[sS](?P<season>[0-9]{2})'             # S08

Why not ask me to add it to the season folder regex like the below so it benefits everybody ?

SEASON_RX = [                                                                                                                                                                            'Specials',                                                                                                                                                                             '(Season|Series|Book|Saison|Livre|S)[ _\-]*(?P<season>[0-9]{1,2}).*',                                                                                                                   '(?P<season>[0-9]{1,2})a? Stagione.*',                                                                                                                                                   '(?P<show>.*?)[\._\- ]+[sS](?P<season>[0-9]{2})',
'((([Ss]tory )?[Aa][Rr][KkCc]).*|.* [Aa][Rr][KkCc])']                   

(first is for specials, last entry is transparently skipped , in between various season regex)
I will add the season folder regex to my scanner. will edit this post with link


Yes, the seasons looks like you said and now that you are saying, I think the standard Plex TV Show Scanner is handling this (oh well). I plan to extend it to support movies also. If you add the the regex to your scanner it may work.

The changes on HAMA are still valid on my case. If you think they are valid for you project, I can make a pull request with them. :)


Plex scanner handles this? Even more reason to add it ;)
For HAMA you really want to try the beta branch, it allows to select the metadata source order per field so you can put anidb summary first
The only bit missing is that it use a single anidb xml for tvdb series, that will be the next fix but cross reference anidb and tvdb both ways cleverly.


Plex scanner does? Even more reasons to add to my scanner...

Please try HAMA beta branch, it should make your changes void. it cross reference anidb and tvdb eps both ways (with anidb and tvdb ids) and allow to select per field like summary the metadata source order like "AniDB, TheTVDB"...


What about the absolute episode numbering with seasons? Check the first episode number from season 2 (is not episode number 1). The episode information will be taken from AniDB?


if you select anidb under summaries ('Anidb|AniDB, TheTVDB') for series and episode summaries separation it will for season 1. need to fix for seasons after that since using a single anidb xml per serie for now


@ZeroQI did you manage to add the season folder regex to your HAMA scanner yet? I just found this and realized I have some anime in the same season structure.


@Rutger-LtCmdData yes in beta branch line 30.


@ZeroQI said:
@Rutger-LtCmdData yes in beta branch line 30.

Beta branch, I had missed that. Thanks!


It should support grouping folders without tags needed and deeper folders depth in the beta branch now.
If not let me know the format used and will fix.


This scanner is working great for my purposes. Sent you a PR to handle versions of rips. E.G. E100v1 and E100v2 in the same folder can be alternate versions of the same EP, and should not match 1 or 2 as their episode number.


@FennyFatal Glad to hear, as generally posts are about issues… Cannot see a PR right now, will keep an eye and commit when i do see it.


Any idea on how to fix Dragon Ball Kai? I wanted to separate them into Seasons (Saiyan, Frieza, Android, Cell, World Tournament, Majin Buu, Evil Buu) but technically Season 01 is all the first 4 seasons combined and Season 02 is the last 2. This is causing issues with the agent and it’s making the Frieza Saga the World/Buu sagas.


That is a scanner thread. the scanner adds the episodes at the right season and episode number in plex.
You want to not follow tvdb nor anidb numbering convention… you could use my scanner with arch/saga folders keeping absolute numberings with tvdb4 mode to make these fake seasons in plex or use “transparent folders” like “arc ffff” to split episodes on disks but not in Plex…