If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
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 Shows Agent

145791015

Comments

  • robertsonkrobertsonk Posts: 31Members, Plex Pass Plex Pass
    mjarends wrote on April 29 2014, 4:41 AM: »

    All - I have updated the scanner and metadata agent plug-ins to fix some of the issues that Ken/Kevin have brought up today.

    Ken - I have added support for the directory path and file name that you were having an issue with above (/HomeMovies/Groton Dunstable Plays/Season01/s01e11 - GD_Annie Jr 2003.m4v). I also could not reproduce the issue with the file name e11 - Leominster Outdoors Take2.mp4. It could be an issue with the default Plex scanner.

    Kevin - I did fix an issue with date-based regular expression that would have caused an issue with the directory path and file names you are using. I do have a couple of suggestions for you though. Because you are using 2013 for your directory name, the scanner and metadata agent are treating the file path as a year-based series. Because of this it is requires that a month and day be at the beginning of the file name (ex: /Server/Home Videos/Capital summertime Ball/2013/06-09 - Capital Summertime ball 2013_06_09 0901 PM 00010.mp4). If you want the plugin to handle the file as a series-based episode then include an "s" or "season" in the directory that contains the file (ex: /Server/Home Videos/Capital summertime Ball/s2013/06 - Capital Summertime ball 2013_06_09 0901 PM 00010.mp4).

    Awesome, you are a legend.

    Thank you once again.

    Regards

    Kevin

  • KenJKenJ Posts: 108Members, Plex Pass Plex Pass
    mjarends wrote on April 29 2014, 4:41 AM: »

    All - I have updated the scanner and metadata agent plug-ins to fix some of the issues that Ken/Kevin have brought up today.

    Ken - I have added support for the directory path and file name that you were having an issue with above (/HomeMovies/Groton Dunstable Plays/Season01/s01e11 - GD_Annie Jr 2003.m4v). I also could not reproduce the issue with the file name e11 - Leominster Outdoors Take2.mp4. It could be an issue with the default Plex scanner.

    Kevin - I did fix an issue with date-based regular expression that would have caused an issue with the directory path and file names you are using. I do have a couple of suggestions for you though. Because you are using 2013 for your directory name, the scanner and metadata agent are treating the file path as a year-based series. Because of this it is requires that a month and day be at the beginning of the file name (ex: /Server/Home Videos/Capital summertime Ball/2013/06-09 - Capital Summertime ball 2013_06_09 0901 PM 00010.mp4). If you want the plugin to handle the file as a series-based episode then include an "s" or "season" in the directory that contains the file (ex: /Server/Home Videos/Capital summertime Ball/s2013/06 - Capital Summertime ball 2013_06_09 0901 PM 00010.mp4).

    Thank you for the change.  Yes, I am using both your scanner and metadata agent.  I just reproduced it, although it took a few iterations of 'refresh' to get Plex to see the change.  I'll look for the plugin log and attach in my next post.

  • KenJKenJ Posts: 108Members, Plex Pass Plex Pass
    edited April 2014

    Hello mjarends.  I've attached the relevant files.  Here's what I did to reproduce.

    Started with 21 videos in folder, the two relevant videos named below:

    "e2 - Aug Jackson Hole Rodeo.m4v" (GUID 48661)

    "e11 - Leominster Playtime.mp4" (GUID 48337)

    Note, the GUIDs are relevant when you look at the Plex Media Scanner log.  I've also attached the XML for each for debug.

    Renamed "e11 - Leominster Playtime.mp4" to "Leominster Outdoors Take2.mp4". 

    Refreshed Plex library and noted that file count decreased from 21 to 20.

    The relevant snippet from the Plex Media Scanner file is (full PMS log attached too) is below.  It appears to be in the Plex Media Scanner.  I could not find any references to "Take2" in the com.arendshome.plex.agents.personalmedia.log's.

    SNIPPET:

    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - File '/Volumes/LaCie/HomeMovies/Jordan/1992/e11 - Leominster Playtime.mp4' didn't exist, can't skip.
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG -       * Scanning Jordan Season 1992 Episode 2
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Looking for path match for [/Volumes/LaCie/HomeMovies/Jordan/1992/e11 - Leominster Outdoors Take2.mp4]
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Checking by hash to see if we can find a match with fef75385f8b707e87775244ee68dc1a082e98518 (display offset: 0, not part -1)
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - We found a hash match for [/Volumes/LaCie/HomeMovies/Jordan/1992/e11 - Leominster Outdoors Take2.mp4] which was [/Volumes/LaCie/HomeMovies/Jordan/1992/e11 - Leominster Playtime.mp4].
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] INFO - Part rename detected [/Volumes/LaCie/HomeMovies/Jordan/1992/e11 - Leominster Playtime.mp4] was renamed [/Volumes/LaCie/HomeMovies/Jordan/1992/e11 - Leominster Outdoors Take2.mp4]
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Updating media item 46139, size=485672074, metadata_item_id=48661
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Updating part with ID=67005 [/Volumes/LaCie/HomeMovies/Jordan/1992/e11 - Leominster Playtime.mp4]
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Hint episode didn't match ('2' != '11') for DB media item 46139
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Checking descendants of Jordan
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG -  -> Searching down into Jordan/1990
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Checking descendants of Jordan/1990
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG -  -> FOUND metadata item (show)
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG -  -> We found a local media item with rooted metadata in Jordan/1990
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Found existing show 48329
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Found existing leaf with index 2.
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Updating metadata item (Aug Jackson Hole Rodeo) with ID 48337
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - HTTP requesting to: http://127.0.0.1:32400/:/metadata/flushMetadataCounterCache
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Added new media item with ID=46140 (episode=2&episodic=1&name=&released_at=2013-11-24&season=1992&show=Jordan)
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Added new media part with ID=67006 [/Volumes/LaCie/HomeMovies/Jordan/1992/e11 - Leominster Outdoors Take2.mp4]
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Deleting media item 46139.
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Was connected to metadata item 48661, count is now 0.
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Destroying metadata item 48661 (Leominster Playtime)
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Updating deletion state for metadata item 48334, is has a dead item count of 0.
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - Updating deletion state for metadata item 48329, is has a dead item count of 0.
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] DEBUG - HTTP requesting to: http://127.0.0.1:32400/:/metadata/flushMetadataCounterCache
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] VERBOSE - [Event] Firing plex.event.library.metadataitem.deleted to 0 sink(s)
    Apr 29, 2014 08:16:41 [0x7fff7e9f0310] VERBOSE - [Event] Firing plex.event.library.section.changed to 0 sink(s)
     

    Ken

    Attachments:

    48661.xml   -   XML for "e11 - Leominster Playtime.mp4" (GUID 48661)

    48337.xml   -   XML for "e2 - Aug Jackson Hole Rodeo.m4v" (GUID 48337)

    Screenshot  -  shows combined "e11" and "e2" files as one video in plex

    Plex Media Scanner.log.txt  -  PMS log file

  • mjarendsmjarends Posts: 177Members, Plex Pass Plex Pass

    Ken,

    You actually can't get scanner logging output from my scanner unless you run the scanner directly. Hopefully we won't have to do that.

    Few questions for you. When you switched to the extended media plugins did you remove your media library and re-add it or did you just change the plug-ins? If you just changed your plugin you may want to try removing the two files you are having an issue with, rescan your library and then re-add them. I will try to reproduce the same issue on my test system with the file paths you provided.

  • mjarendsmjarends Posts: 177Members, Plex Pass Plex Pass

    Ken,

    Just noticed this party:

    Renamed "e11 - Leominster Playtime.mp4" to "Leominster Outdoors Take2.mp4".

    If you renamed the file without the e11 at the beginning, the scanner plugin would have used e2 at the end of the title as the episode number. This means it would have been stacked on top of the e2 - Aug Jackson Hole Rodeo.m4v video. Renaming the file to e11 - Leominster Playtime or something equivalent results in the file being unstacked on my server. All of this is normal behavior within Plex. The extended scanner and metadata agent just find and extra information from the file paths/names. Plex takes care of managing this information once it's found.

  • KenJKenJ Posts: 108Members, Plex Pass Plex Pass
    mjarends wrote on April 30 2014, 3:31 AM: »

    Ken,

    Just noticed this party:

    Renamed "e11 - Leominster Playtime.mp4" to "Leominster Outdoors Take2.mp4".

    If you renamed the file without the e11 at the beginning, the scanner plugin would have used e2 at the end of the title as the episode number. This means it would have been stacked on top of the e2 - Aug Jackson Hole Rodeo.m4v video. Renaming the file to e11 - Leominster Playtime or something equivalent results in the file being unstacked on my server. All of this is normal behavior within Plex. The extended scanner and metadata agent just find and extra information from the file paths/names. Plex takes care of managing this information once it's found.

    My write-up was incorrect, I did rename it to "e11 - Leominster Outdoors Take2.mp4" (i.e. the e11 part was still there).

  • KenJKenJ Posts: 108Members, Plex Pass Plex Pass
    mjarends wrote on April 30 2014, 2:25 AM: »

    Ken,

    You actually can't get scanner logging output from my scanner unless you run the scanner directly. Hopefully we won't have to do that.

    Few questions for you. When you switched to the extended media plugins did you remove your media library and re-add it or did you just change the plug-ins? If you just changed your plugin you may want to try removing the two files you are having an issue with, rescan your library and then re-add them. I will try to reproduce the same issue on my test system with the file paths you provided.

    I honestly don't recall but I think I started with a fresh media library using the extended scanner and agent.  I will redo a new media library with that one folder from scratch and let you know.

  • KenJKenJ Posts: 108Members, Plex Pass Plex Pass

    Ok, it worked properly after creating a new media library "test" with the 2 files and your extended scanner and agent.  I'd say that this issue be considered closed at this point.  Thank you again for your fast action and response.  Ken

  • TheassistmanTheassistman Posts: 8Members, Plex Pass Plex Pass

    Hi mjarends,

    Firstly, I'd like to thank you for all you do for all of us here. This personal media solution is something I've been wanting for a while. I have an extensive collection of basketball on my computer and I'm relatively new to the Plex scene. I have however tried to do as much research as possible so that I don't waste your time . I have renamed some of my basketball games to go with the format you describe. So presently I have them stored as follows. NBA/2013/NBA-2013-04-11-Miami vs Chicago.mkv. So I have a root folder called basketball, because some of the games I have archived aren't just NBA games, but they are WNBA or EuroLeague games. That way, the league (NBA, WNBA,Euroleague,NCAA etc) will be the TV show name and then I have them in yearly season folders such as 2011,2012 etc.

    When I first added the Basketball library in plex and selected the extended personal media scanner, it seemed to select everything properly except for games on the same day. I will proceed to rename them in the _XX suffix format you proposed. However I noticed that each time I corrected errors in the file names and then subsequently deleted and re-created the library, the insconsistencies in the placement of media grew. For example, a file named and placed in the NBA/2013 folder would appear in the library in WNBA. Is it because I didn't restart Plex each time? I don't want you to change your plugin to match my situation. I'll rename the files all in the correct format (1000+). Could you please help me with this situation.

    Thanks

  • mjarendsmjarends Posts: 177Members, Plex Pass Plex Pass
    edited July 2014

    Theassistman,

    According to your post it looks like you are naming episodes the correct way. I tested the folder/file path that you provided in your example on my test server and it worked correctly. As you discovered the default media scanner combines shows that have the same date which necessitates the need for adding the _XX to dates where you have multiple shows. I too have seen some strange behavior when adding media to Plex after I have renamed files. What I do in these situations to fix the episodes within Plex is the following (I do not recreate the library):

    • Rename the files
    • Remove only the renamed files from the library
    • Refresh/rescan the library
    • After the refresh is complete verify the files no longer are displayed in the library
    • Move the files back into the library
    • Refresh/rescan the library
    • Verify the files show up with the correct names

    In my case this has always corrected the episodes within Plex. I also occasionally see this occur when I add episodes out of order in Plex. Let me know if  you get the same results from the steps above. If you are still having issues you could also post a log for the plug-in and I can take a look to see if it sheds light on the issue.

  • TheassistmanTheassistman Posts: 8Members, Plex Pass Plex Pass

    mjarends,

    I renamed the files that had the same dates and that seemed to work out fine. However, the files are being placed under the wrong 'TV Shows' if that makes sense. For example. Some NBA games are appearing under WNBA, and EuroLeague games appearing under NBA. That's why I was then deleting the library and trying to re add items. I followed the steps such as selected the extended personal media scanner and agent, but the problem persists. I don't know how to get the log file, I'll read previous posts and then send it to you. Thanks once again for the speedy response. I appreciate it.

  • mjarendsmjarends Posts: 177Members, Plex Pass Plex Pass

    I added additional details to the first post in this thread on where to find log files for the plug-in. I wanted to let you know In case you haven't found the log files yet.

  • TheassistmanTheassistman Posts: 8Members, Plex Pass Plex Pass

    mjarends,

    Thanks once again for all your help. I have attached the log file. It seems like it is placing some of the 'shows'in the wrong 'show'. For example, the EuroLeague games and the NBA games are getting mixed up when displayed in plex. But the naming convention for both these 'shows' is correct. I even structured my folders in such a way that they are easy to trace back. e.g. Basketball/NBA/2013/NBA-2013-01-12-Denver vs Chicago 720p.mkv.

    I really want to get this to work, and I appreciate you going out of your way to help.

  • mjarendsmjarends Posts: 177Members, Plex Pass Plex Pass

    Just started to take a look at this. Is it all NBA and Euroleague episodes or is it just specific ones? If it is just specific episodes can you give me an example of the episodes that are being grouped under the same show?

  • chmmrtchmmrt Posts: 3Members, Plex Pass Plex Pass

    Hi,

    Thanks for all your work on this plugin.

    Is it possible to have posters for either the files or a main poster for the folder the files are in?

    I didn't see it mentioned anywhere.

    Thanks!

  • mjarendsmjarends Posts: 177Members, Plex Pass Plex Pass
    chmmrt wrote on August 12 2014, 7:50 PM: »

    Hi,

    Thanks for all your work on this plugin.

    Is it possible to have posters for either the files or a main poster for the folder the files are in?

    I didn't see it mentioned anywhere.

    Thanks!

    My plugin supports using the standard show and episode level images. See the Plex naming guide for more details.

    Let me know if you need any help getting it working.
  • wally007wally007 Posts: 1,240Members, Plex Pass Plex Pass

    Hello,

    I'm using my modified scanner/agent which was posted years ago and would like to migrate to yours as it seems to be a bit more flexible. 

    1, Does your agent read mp4 tags or is it just .summary files ?

    2, Can your agent accept theTVDB agent as a secondary source ? (reason I ask is that I'd like to use this agent for exported TV recordings and where i'd like this agent to read Show name, Season number, Episode info,  theTVDB agent would provide missing Show Summary Information, posters and backgrounds (if available, of course )

    Thanks 

    Kind regards

  • mjarendsmjarends Posts: 177Members, Plex Pass Plex Pass

    wally007,

    1. The Extended Personal Media scanner/agent does not currently look at the MP4 tags to extract information. It uses the file name only in building the metadata within Plex. In my current setup I use the Extended Personal Media plugin and the Local Media metadata agent. I believe the Local Media metadata agent does look at the MP4 tags for data. You may want to test these two plugins with your own data to see if it works.

    2. I only use the plugin with personal media and have not tried it with other metadata agents other than the Local Media metadata agent listed above. Ultimately the Extended Personal Media metadata agent should parse the file names and build the metadata needed by the TVDB Agent to lookup the information. If you end up trying this combination please post back and let others know.

    Thanks,

    Mitch

  • justinhindjustinhind Posts: 22Members, Plex Pass Plex Pass

    I can't access the settings for this agent. Instead of a gear icon I see an "i" button that says:

    Provides an agent capable of parsing files names to extract the episode titles. Primarily used for personal media that use the format SHOW TITLE - yyyy-MM-dd - EPISODE TITLE.ext or SHOW TITLE - sXXXXeXXXX - EPISODE TITLE.ext

    Any idea why this might be?

    Screen%20Shot%202014-09-08%20at%205.52.3

  • mjarendsmjarends Posts: 177Members, Plex Pass Plex Pass
    There are no longer any options for this agent. They were removed a few releases back in favor of making the file name parsing more robust.
145791015
Sign In or Register to comment.