Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

[REL] Extended Personal Media Scanner

mjarendsmjarends Posts: 159 Plex Pass

This scanner is meant to be used with the Extended Media Metadata Agent found here. See the documentation on the metadata agent plugin to see how files should be organized within your personal media sections.

This scanner is not meant to be full replacement of the Plex Media Scanner. Requests for functionality will be considered but may be limited by what Plex currently allows in the TV Show sections.

Differences between this scanner and Plex Media Scanner

This scanner differentiates itself from the Plex Media Scanner by:

  • Uniquely assigns an episode number to date-based personal media. This allows for multiple shows on the same date. This is particularly useful for home movies, organizing sports videos, etc.
  • This scanner does not read tag data from MP4 files or other types of media. This may be added in a future release if there is enough demand for it.

Known Issues

Issue:

Renaming shows that have already been processed sometimes causes Plex to create a new TV show within Plex.

How to fix:

  1. Remove the files that were created in the new TV show from the original directory.
  2. In Plex, scan the section so that Plex detects that the files have been removed.
  3. Re-add the files back to the original directory.
  4. In Plex, scan the section so that Plex detects the files and adds them back to the original TV Show.

Download and source

Download: https://bitbucket.org/mjarends/plex-scanners/get/master.zip

Source: https://bitbucket.org/mjarends/plex-scanners/src

Installation

  • Unzip the downloaded ZIP file, this gives you a file/folder with the name plex-scanners-XXXXXXXX. Rename the folder to plex-scanners.
  •  
    • Mac
      • Copy the Series folder from the plex-scanners folder created above to ~/Library/Application Support/Plex Media Server/Scanners folder. The easiest way to find this folder is to use the Go to folder... option in the Go menu of the Finder.

        ~ is your home folder. If you can't find your Library folder, have a look at OS X Lion: Where did my Library go?
    • Windows
      • Copy the Series folder from the plex-scanners folder created above to the Plex Media Server Scanners directory. To get to the Scanners directory right-click the Plex Media Server icon in the system tray and open the Plug-ins folder. In Windows Explorer go up a directory and then select the Scanners directory.
    • Linux (Ubuntu)
      • Copy the Series folder from the plex-scanners folder created above to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Scanners
  • Restart Plex Media Server (this is optional)
    On Mac and Windows: just quit and start again
    On Linux (Ubuntu): sudo service plexmediaserver restart
  • In Plex/Web (the media manager), create a new "TV Shows" section and select Extended Personal Media Scanner from the Scanner dropdown menu (under Advanced Options).

Change Log:

4/4/2015: Moved the creation of the scanners to within the Scan method

5/29/2015: Added support for episode formatted files that contain episode release dates (ex: s1e1 - 2014-12-13 - Episode Title.mp4)

1/6/2016: Added support for two digit episode index numbers in date-based episodes (ex: \Show Title - s2012e09 - 2015-12-31_25 - Episode Title.mp4. (NOTE: Updating the plug-in and rescanning your library will result in new episode numbers being created)

«13

Comments

  • wally007wally007 Posts: 1,199 Plex Pass
    edited December 2013

    I'd like to cast a vote for mp4 metadata reading. At the moment I use standard Plex Media Scanner but I hit the bug " multiple shows on the same date " every now and then.

    I've reported the bug but was told that it wont be fixed, so I'd like to get rid of it ASAP. ( I wonder what people are doing with repeating daily shows which air more than once each day )

  • FranzStoffelFranzStoffel Posts: 33 Plex Pass

    Hi Mitch!

    First of all thanks for the early Christmas present!

    Could not wait to test this scanner but had a hardware failure on my server :(

    All good now, installed the new agent and scanner after I upgraded the PMS. Deleted my old section, created a new one with your scanner and agent but it would not find any media at all.

    When I switched back to the series scanner they all appeared again...

    Am I doing something wrong or has the new PMS version broken something?

    Cheers

    Franz

  • I've had this installed in the past, with no issues. I just re-installed it and restarted my Plex Server. For some reason it is no longer showing up within my Scanner sections. :( Should I rename it to just Extended Personal Media? 

  • schteffschteff Posts: 9 Plex Pass

    Hi!

    I'm having trouble with the agent using the episode name from other files. 

    Here is the log for one example.

    The two different files (from different shows) should be named 

    Svennes stuga i Sandselet

    and

    Kreta

    but they both get the name Kreta in Plex. 

    2014-11-12 23:09:36,266 (f10) :  INFO (logkit:16) - update :: episode metadata: <Framework.modelling.attributes.RecordObject object at 0x04E2BF90>
    2014-11-12 23:09:36,267 (1dc0) :  INFO (logkit:16) - update :: episode: 1621
    2014-11-12 23:09:36,269 (f10) :  INFO (logkit:16) - update :: episode file path: 
    D:\hemmedia\video\Elisabeth och Bert-Görans videor\1990\1990-07-21 Svennes stuga i Sandselet.mp4 2014-11-12 23:09:36,269 (1dc0) : INFO (logkit:16) - update :: episode metadata: <Framework.modelling.attributes.RecordObject object at 0x0337AEB0> 2014-11-12 23:09:36,269 (f10) : INFO (logkit:16) - unicodize :: before unicodizing: D:\hemmedia\video\Elisabeth och Bert-Görans videor\1990\1990-07-21 Svennes stuga i Sandselet.mp4 2014-11-12 23:09:36,269 (1dc0) : INFO (logkit:16) - update :: episode file path: D:\hemmedia\video\Inga och Arnes kamera\1997\1997-06-11 - Kreta.mp4 2014-11-12 23:09:36,270 (f10) : INFO (logkit:16) - unicodize :: after unicodizing: D:\hemmedia\video\Elisabeth och Bert-Görans videor\1990\1990-07-21 Svennes stuga i Sandselet.mp4 2014-11-12 23:09:36,272 (1dc0) : INFO (logkit:16) - unicodize :: before unicodizing: D:\hemmedia\video\Inga och Arnes kamera\1997\1997-06-11 - Kreta.mp4 2014-11-12 23:09:36,273 (f10) : INFO (logkit:16) - update :: absolute file path: D:\hemmedia\video\Elisabeth och Bert-Görans videor\1990\1990-07-21 Svennes stuga i Sandselet.mp4 2014-11-12 23:09:36,273 (1dc0) : INFO (logkit:16) - unicodize :: after unicodizing: D:\hemmedia\video\Inga och Arnes kamera\1997\1997-06-11 - Kreta.mp4 2014-11-12 23:09:36,273 (f10) : INFO (logkit:16) - update :: parser <__code__.SeriesDateBasedMediaParser object at 0x0337AF30> contains match - parsing file path 2014-11-12 23:09:36,275 (1dc0) : INFO (logkit:16) - update :: absolute file path: D:\hemmedia\video\Inga och Arnes kamera\1997\1997-06-11 - Kreta.mp4 2014-11-12 23:09:36,276 (f10) : INFO (logkit:16) - parse :: regex [\\/](?P<showTitle>[^\\/]+?)[ ]*[-\.]{0,1}[ ]*(?P<episodeYear>[0-9]{4})[-\. ](?P<episodeMonth>[0-9]{2})[-\. ](?P<episodeDay>[0-9]{2})(_(?P<episodeIndex>[0-9]+)){0,1}[ ]*[-\.]{0,1}[ ]*(?P<episodeTitle>.*)\.(?P<ext>.+)$ - matches: None 2014-11-12 23:09:36,276 (1dc0) : INFO (logkit:16) - update :: parser <__code__.SeriesDateBasedMediaParser object at 0x0337AF30> contains match - parsing file path 2014-11-12 23:09:36,276 (f10) : INFO (logkit:16) - parse :: regex [\\/](?P<showTitle>[^\\/]+?)[ ]*[-\.]{0,1}[ ]*(?P<episodeMonth>[0-9]{2})[-\. ](?P<episodeDay>[0-9]{2})[-\. ](?P<episodeYear>[0-9]{4})(_(?P<episodeIndex>[0-9]+)){0,1}[ ]*[-\.]{0,1}[ ]*(?P<episodeTitle>.*)\.(?P<ext>.+)$ - matches: None 2014-11-12 23:09:36,278 (1dc0) : INFO (logkit:16) - parse :: regex [\\/](?P<showTitle>[^\\/]+?)[ ]*[-\.]{0,1}[ ]*(?P<episodeYear>[0-9]{4})[-\. ](?P<episodeMonth>[0-9]{2})[-\. ](?P<episodeDay>[0-9]{2})(_(?P<episodeIndex>[0-9]+)){0,1}[ ]*[-\.]{0,1}[ ]*(?P<episodeTitle>.*)\.(?P<ext>.+)$ - matches: None 2014-11-12 23:09:36,278 (f10) : INFO (logkit:16) - parse :: regex (?P<showTitle>[^\\/]+)[\\/](?P<seasonNumber>[0-9]{4})([-\. ]+(?P<seasonTitle>[^\\/]+)){0,1}[\\/][^\\/]*?(?P<episodeYear>[0-9]{4})[-\. ](?P<episodeMonth>[0-9]{2})[-\. ](?P<episodeDay>[0-9]{2})(_(?P<episodeIndex>[0-9]+)){0,1}[ ]*[-\.]{0,1}[ ]*(?P<episodeTitle>.*)\.(?P<ext>.+)$ - matches: <_sre.SRE_Match object at 0x04FDD140> 2014-11-12 23:09:36,279 (1dc0) : INFO (logkit:16) - parse :: regex [\\/](?P<showTitle>[^\\/]+?)[ ]*[-\.]{0,1}[ ]*(?P<episodeMonth>[0-9]{2})[-\. ](?P<episodeDay>[0-9]{2})[-\. ](?P<episodeYear>[0-9]{4})(_(?P<episodeIndex>[0-9]+)){0,1}[ ]*[-\.]{0,1}[ ]*(?P<episodeTitle>.*)\.(?P<ext>.+)$ - matches: None 2014-11-12 23:09:36,279 (f10) : INFO (logkit:16) - parse :: found matches 2014-11-12 23:09:36,279 (1dc0) : INFO (logkit:16) - parse :: regex (?P<showTitle>[^\\/]+)[\\/](?P<seasonNumber>[0-9]{4})([-\. ]+(?P<seasonTitle>[^\\/]+)){0,1}[\\/][^\\/]*?(?P<episodeYear>[0-9]{4})[-\. ](?P<episodeMonth>[0-9]{2})[-\. ](?P<episodeDay>[0-9]{2})(_(?P<episodeIndex>[0-9]+)){0,1}[ ]*[-\.]{0,1}[ ]*(?P<episodeTitle>.*)\.(?P<ext>.+)$ - matches: <_sre.SRE_Match object at 0x04FDD260> 2014-11-12 23:09:36,280 (f10) : INFO (logkit:16) - scrubString :: original: [Svennes stuga i Sandselet] scrubbed: [Svennes stuga i Sandselet] 2014-11-12 23:09:36,282 (1dc0) : INFO (logkit:16) - parse :: found matches 2014-11-12 23:09:36,282 (f10) : INFO (logkit:16) - setValues :: file name without extension D:\hemmedia\video\Inga och Arnes kamera\1997\1997-06-11 - Kreta 2014-11-12 23:09:36,282 (1dc0) : INFO (logkit:16) - scrubString :: original: [Kreta] scrubbed: [Kreta] 2014-11-12 23:09:36,283 (f10) : INFO (logkit:16) - setValues :: looking for summary file D:\hemmedia\video\Inga och Arnes kamera\1997\1997-06-11 - Kreta.summary 2014-11-12 23:09:36,283 (1dc0) : INFO (logkit:16) - setValues :: file name without extension D:\hemmedia\video\Inga och Arnes kamera\1997\1997-06-11 - Kreta 2014-11-12 23:09:36,285 (f10) : INFO (logkit:16) - setValues :: summary file does not exist 2014-11-12 23:09:36,286 (1dc0) : INFO (logkit:16) - setValues :: looking for summary file D:\hemmedia\video\Inga och Arnes kamera\1997\1997-06-11 - Kreta.summary 2014-11-12 23:09:36,286 (f10) : INFO (logkit:16) - update :: before setting season.summary: None 2014-11-12 23:09:36,288 (1dc0) : INFO (logkit:16) - setValues :: summary file does not exist 2014-11-12 23:09:36,288 (f10) : INFO (logkit:16) - update :: season.summary: None 2014-11-12 23:09:36,289 (1dc0) : INFO (logkit:16) - update :: before setting season.summary: None 2014-11-12 23:09:36,289 (f10) : INFO (logkit:16) - update :: episode.title: Kreta 2014-11-12 23:09:36,289 (1dc0) : INFO (logkit:16) - update :: season.summary: None 2014-11-12 23:09:36,290 (f10) : INFO (logkit:16) - update :: episode.summary: None 2014-11-12 23:09:36,292 (1dc0) : INFO (logkit:16) - update :: episode.title: Kreta 2014-11-12 23:09:36,292 (f10) : INFO (logkit:16) - update :: episode: 2101 2014-11-12 23:09:36,292 (1dc0) : INFO (logkit:16) - update :: episode.summary: None 2014-11-12 23:09:36,293 (f10) : INFO (logkit:16) - update :: episode metadata: <Framework.modelling.attributes.RecordObject object at 0x04E2BC30> 

    From what I can tell from the log, they seem to run through the algorithm simultaneously which I believe is what causes the issue. 

    This is just one example, there are many more in my library. 

  • mjarendsmjarends Posts: 159 Plex Pass
    edited November 2014

    schteff - Would it be possible to see the entire log? Based on the information above I can't determine the problem. As a side note Plex actually controls the number of threads that get called to read and parse media. The scanner plug-in is just parsing the file names and providing the information back to Plex. It's possible that there is another video outside of the details logged above that may be causing this issue.

  • schteffschteff Posts: 9 Plex Pass

    I have temporarily "solved" it by creating a separate library per tv show. And i'm currently kinda busy looking through them all for a high priority project. But later in december I will try putting all the "shows" in the same library again. I will post the result then. Thanks for the reply!

  • ytandoganytandogan Posts: 9 ✭✭

    Hi,

    I just discovered this Scanner + Agent.

    I am using Ubuntu 14.04 and Plex 0.9.12.0.

    I have an issue with the Scanner. I followed the installation instructions, all permissions are plex:plex and 770. Agent seems to be ok but scanner does not seem to be installed properly.

    When I choose the Extended Personal Media Scanner Plex says "Scanner A Scanner is  required" and does not allow to create or edit the Library.

  • mjarendsmjarends Posts: 159 Plex Pass
    Make sure under the Scanners folder you see the path Series/Extended Personal Media Scanner.py

    You might also need to restart your server
  • cayarscayars Posts: 3,754 Plex Ninja

    Has anyone noticed you can't use this scanner with the newest Plex server build?

    When I now try and use it to create a new library I get "Scanner A scanner is required"

    Has anyone else tried to use this with the Version 0.9.12.1 version of the server?

    Carlo

  • mjarendsmjarends Posts: 159 Plex Pass

    Carlo - I'm also running 0.9.12.1. I just verified on my server and the scanner is still showing up correctly under the sections where I'm using it. Did you recently re-install it?

  • cayarscayars Posts: 3,754 Plex Ninja

    It shows up but you can't use it.  Try creating a new test library pointed to something you already have setup and know to be working (a duplicate library).

    You should see it won't work.

    If you want a hurting then also try this.  Remove a file from an existing library managed by this scanner and delete trash and clean bundles.  Then add the file back and do a refresh.

    You'll see that even on existing libraries previously setup under an older version of Plex it will now NOT use the scanner correctly and will try and load the file with a standard TV Show scanner.

    This sort of problem has also been mentioned here: https://forums.plex.tv/topic/160013-pms-09120-doesnt-let-me-create-libraries-with-alternate-agent-or-scanner/

    and I opened this: https://forums.plex.tv/topic/161021-quick-fix-needed-customer-scanners-broke-in-new-version-of-plex/

    Carlo

    PS I hadn't noticed this other thread before posting here. So it's not a problem with this scanner in itself but something in Plex "core".

  • TornadoContestTornadoContest Posts: 121 ✭✭

    Hi, does this read embedded MP4 metadata yet?

  • mjarendsmjarends Posts: 159 Plex Pass
    TornadoContest wrote on May 15 2015, 5:51 AM: »

    Hi, does this read embedded MP4 metadata yet?

    There is already a local media metadata agent that Plex provides and can be used in tandom with the Extended Personal Media scanner/metadata agent. The local media metadata agent reads the tag data from the local files and sets them in the metadata within Plex. The extended persona media scanner/metadata agent adds the ability to use the file name to set metadata in Plex. Let me know if you have any questions.

  • TornadoContestTornadoContest Posts: 121 ✭✭

    Ah, ok. I have a recurrent issue with the existing Local Media Assets Agent and Personal Media Agent not scraping Release Year, full Genre listings, Long Description and full Cast Lists. Sometimes, it skips the artwork, too. Sometimes, it skips the entire cast. Most often, it ignores that Personal Media and Local Media Assets are set as the primary and secondary agents and that the only additional agents checked are Freebase, TMDB and TVDB and only so because they are force checked and cannot be unchecked. Removing the bundles for those items works until the server is updated or restarted, when they are recreated. So, then it gives me marketing log lines, horribly written plot summaries, bit players instead of the starring and supporting casts, partial genre listings, other people's ratings and everything in my library, including the silent films, were all apparently made in the year they were added to my server. Fixing all this by hand is annoying and a waste of time, especially, given that I already spent the time to fully and correctly add and embed all the metadata I want. It, also, refuses to acknowledge 2/3rds of the Twin Peaks Gold Box Set because my ordering is not the same as some online database or another that I don't want to use at all. So, I was hoping the Extended Personal Media scanner/agent was something that would more fully and correctly scrape user created MP4 metadata and, in so doing, help override the forced defaults to bad databases.

  • mrkaymrkaymrkaymrkay Posts: 21 Plex Pass
    edited March 2016

    Hi guys,
    I have two strange issues:
    1/. I have a folder with mp4 files named like so: genre, NameOfTheShow - SnnEnn - title.mp4. None of these files appears in the Plex library

    2/. I have named my shows with a prefix to have them sorted properly in the Plex Library. They are named like above with "genre," at the start of each name. When I import those files, they are all added to a single show rather than creating separate ones. For example:
    / Files
        / Music
            / Show 1
                    Music, Show 1 nice - S01E01 - my Tuto.mp4
                    Music, Show 1 nice - S01E02 - my other Tuto.mp4
            / Show 2
                    Music, Show 2 great - S01E01 - my song.mp4
                    Music, Show 2 great - S01E02 - my other other song.mp4

    These are merged in a single how and I don't know why...

    Any help would me much welcomed!

    Thanks in advance guys!

  • mjarendsmjarends Posts: 159 Plex Pass

    @mrkaymrkay I tested the directory structure that you posted on my test system and I am seeing separate shows and episodes being created by the plug-in. Can you ensure that you have done the following:

    • Installed the Extended Personal Media Scanner - details are available at the top of this thread
    • Installed the Extended Personal Media Metadata Agent - details are available here: https://forums.plex.tv/discussion/83440/rel-extended-personal-media-shows-agent/p1
    • Create/modify your library to use the Extended Personal Media Scanner and Metadata agent by clicking on the library Edit button and then on the Advanced link and changing the two settings indicated by the screen capture below.

    • Update your library in Plex using the Update Library button (shown in the screen capture below).

  • mrkaymrkaymrkaymrkay Posts: 21 Plex Pass

    Hi mjarends and thanks for the feedback!

    Both agent and scanner are installed and did work for another Library I made yesterday.

    That's very odd indeed...

  • mjarendsmjarends Posts: 159 Plex Pass

    I'm assuming that you are intending the show name to be "Music, Show name" and the title to be the part after the sXXeXx part. That's the outcome that I got.

    You can enable debug logging and I could take a look at the logs if you want.

  • mrkaymrkaymrkaymrkay Posts: 21 Plex Pass
    edited March 2016

    Thanks,

    I'll do it in the morning and shall post it here
    This is the cas where one of the show does not appear at all in the library.

    I wil reproduce the other case with a smaller amount of files before posting the log

    Thanks in advance for your help.

    EDIT: Log added

  • mrkaymrkaymrkaymrkay Posts: 21 Plex Pass

    Hi mjarends,

    Any luck with my log?

«13
Sign In or Register to comment.