[REL] Extended Personal Media Shows Agent

@mjarends An ini file with all properties of the “TV show” including release and studio would be great!

Hi @mjarends, any news about the metadata ini?

Heya!
Because of the limitations of another tool I’m using, would it be possible for you to add support for episode description files with the .description file extension in addition to .summary?

Big release for everyone. You will need to update both the scanner and the metadata agent.

See the first post and the plug-in readme for more details. High-level change log is:

  • Added support for scrubbing/replacing characters within the episode title. See the plugin configuration page in Plex.
  • Added support for show metadata INI file. See the plugin README.md for more details.
  • Added support for changing the summary file extension name. See the plugin configuration page in Plex.
  • Added support for changing the metadata file extension name. See the plugin configuration page in Plex.
  • Added support for using Lesson as Season keyword

Thanks to Christian Kotte for the metadata INI changes, episode scrubbing changes and README updates.

@lukeroge See the plugin configuration page to change the summary file extension name

@zed123789 You can now add a show.metadata file with some basic show information

As always let me know if anyone has any issues.

@mjarends said:
Big release for everyone. You will need to update both the scanner and the metadata agent.

See the first post and the plug-in readme for more details. High-level change log is:

  • Added support for scrubbing/replacing characters within the episode title. See the plugin configuration page in Plex.
  • Added support for show metadata INI file. See the plugin README.md for more details.
  • Added support for changing the summary file extension name. See the plugin configuration page in Plex.
  • Added support for changing the metadata file extension name. See the plugin configuration page in Plex.
  • Added support for using Lesson as Season keyword

Thanks to Christian Kotte for the metadata INI changes, episode scrubbing changes and README updates.

@lukeroge See the plugin configuration page to change the summary file extension name

@zed123789 You can now add a show.metadata file with some basic show information

As always let me know if anyone has any issues.

Where is this scanner/agent getting the episode number from ?

My file name is called
The Supervet - 2017-10-17 - (1:23pm, Oct, 25 2017).mp4

yet the episode number is set to
Season 2017 Episode 29001

Title and summary are correctly extracted from the file name and summary file, but episode number is just too long to be legible on some clients.

In the past I’ve been using a scanner that would always increase the last Episode number. So if I recorded 2 episodes form the same show on the same day , it would always +1.

For example
The Supervet - 2017-10-17 - (1:23pm, Oct, 25 2017).mp4 would be set to Episode 1 (if its the first file in the Season 2017 folder)
The Supervet - 2017-10-17 - (3:00pm, Oct, 25 2017).mp4 would be set to Episode 2

Is this possible here ?

Thanks

@wally007 It gets the season and the episode numbers from the date in the file name. The plugin calculates an episode number using the date as follows:

[Year]-[Month]-[Day]([Episode Number])

Where the [Year] becomes the season number. The [Month] and [Day] are used to calculate the number of days after the start of the year. The [Episode Number] is optional and can be used to number multiple episodes on the same day so they show up separately within Plex.

This results in the episode number being between 3-5 digits long:
[Days from start of the year][Episode Number]

Using your file above 10-17 was 290 days after the start of the year and 01 was added because the plugin always defaults to 01 if an episode number is not provided.

Unfortunately it is not possible with this plug-in to have shorter episode numbers if you are using date based episode numbering. Which plug-in implements the episode numbering as you have described?

Documentaries scanner. It’s got very handy feature where it increments episode number for each video file.

First off, I just want to say how great this agent is. I’ve been trying to figure out how to deal with Tutorials and this is a really solid solution. It took me a bit to get it up and running on my Synology, and it seems to mostly be functioning right now, but I’ve got a couple of questions.

Here’s an example folder structure:

/tutorials
   /Music - Guitar
      Various Guitar Tutorials.summary
      /Lesson01 - Rock
         1 - Basic Chords.mp4
         2 - Solos.mp4
         3 - Exercises.mp4
         Rock Basics Tutorial.summary
      /Lesson02 - Blues
         1 - Strum Patterns.mp4
         2 - Rhythm.mp4
         3 - Lead Lines.mp4
         Learning the Blues.summary

For me the .summary files don’t appear to do anything, I can’t see the text displayed anywhere within PMP. I tried the suggestions up-thread of changing files and forcing a refresh, but no luck. Also, I tried creating the files before I even copied the tutorial onto my Plex server so that it was there from the beginning, but it still doesn’t show up. I’m not sure what I’m doing wrong, or if maybe I’m just misinterpreting what they do.

Also, right now if I have 20 Guitar Tutorials they’re just listed in PMP as Season 1 - Season 20, and you can’t really tell which tutorial is which until you actually open the season. But even then, since the .summary files aren’t working, there’s no description inside of that season, so you have to guess based on episode titles. Is there a way to make Season 1 use the folder name or .summary name instead so it shows up as as Lesson01 - Rock or even just Rock?

Any help would be appreciated, thanks!

Edit: So after reading a bunch more threads it doesn’t look like it’s possible to change the Season 1 titles, but I’ve adopted the “solution” others use of putting what each season is on the show info page.

@rwoffice It looks like you found your answers. As you have already stated the .summary files can only be used to set the text at the show level and on each episode. Currently there is a bug within Plex that is preventing the plug-in from setting the summary at the season level. The summary files need to match the title of the show or of the episode in order to be picked up by the plug-in.

Let me know if you have any other questions.

Gotcha! Thanks so much :slight_smile:

@mjarends said:
@wally007 It gets the season and the episode numbers from the date in the file name. The plugin calculates an episode number using the date as follows:

[Year]-[Month]-[Day]([Episode Number])

Where the [Year] becomes the season number. The [Month] and [Day] are used to calculate the number of days after the start of the year. The [Episode Number] is optional and can be used to number multiple episodes on the same day so they show up separately within Plex.

This results in the episode number being between 3-5 digits long:
[Days from start of the year][Episode Number]

Using your file above 10-17 was 290 days after the start of the year and 01 was added because the plugin always defaults to 01 if an episode number is not provided.

Unfortunately it is not possible with this plug-in to have shorter episode numbers if you are using date based episode numbering. Which plug-in implements the episode numbering as you have described?

I’m trying to use date based naming convention for my recorded TV, however I"m running into the similar error with this agent as with the built in Plex one. If i record the same show twice in the same day, metadata from the latest one is displayed for them all.

While it’s an improvement over the built in agent (which doesnt show the 2nd episode at all), is there anyway to fix this so that I get unique metadata for each aired episode ?

Thanks

@wally007 In order for shows to show up as different episodes you need to add the below:

Peppa Pig - YYYY-MM-DD_ - Episode Title.

As an example:

Peppa Pig - 2017-11-11_1 - School Bus Trip.wtv
Peppa Pig - 2017-11-11_2 - Rebecca Rabbit.wtv

Thanks.

I’ve figured that out, after re-reading your bitbucket page. Unfortunately there is no easy way to automate this.
My post-processing script takes one recording at the time and it works on each file independently. It has no concept of sequence etc and it’s nowhere to be found in the recording metadata, of course.

I cant believe this ‘bug’ has been ignored in Plex for years now. Am I the only who has multiple episodes of a show without SxxExx ?

@wally007 In Plex’s defense I can see why this is a low priority feature for them to add. Normally released media (which Plex was built for) is released with season and episode numbering so it’s generally not a problem. I only use this plug-in for media I manually organize (which is mainly home videos).

One possible solution for you since you want to do everything within a post processing script (and the script is unaware of the other files) would be to create unique episode numbers out of the data you do have. For example:

[Show Title] - S[Year Number]E[Month Recorded][Day Recorded][Hour Recorded][Minute Recorded] - YYYY-MM-HHH - [Episode Title]

Where
[Show Title] = Peppa Pig
[Year Number] = 2017
[Month Recorded] = 11
[Day Recorded] = 11
[Hour Recorded] = 13
[Minute Recorded] = 30
[Episode Title] = School Bus Trip

Peppa Pig - S2017E11111330 - 2017-11-11 - School Bus Trip

@mjarends said:
@wally007 In Plex’s defense I can see why this is a low priority feature for them to add. Normally released media (which Plex was built for) is released with season and episode numbering so it’s generally not a problem. I only use this plug-in for media I manually organize (which is mainly home videos).

One possible solution for you since you want to do everything within a post processing script (and the script is unaware of the other files) would be to create unique episode numbers out of the data you do have. For example:

[Show Title] - S[Year Number]E[Month Recorded][Day Recorded][Hour Recorded][Minute Recorded] - YYYY-MM-HHH - [Episode Title]

Well, Plex now officially supports DVR. What about people that record Kid shows that dont have S/E, Sports or News ?!

I thought about what you’ve proposed but Episode number becomes something of an eyesore… I will have to think a bit more on this.

@wally007 Good point on the DVR news/sports programs. I might try to record a couple and see how Plex is handling those. It may be possible to duplicate whatever logic they are using into my plug-in. It will probably be a couple of days before I try this but I will get back to you with what I find out.

@mjarends said:
@wally007 Good point on the DVR news/sports programs. I might try to record a couple and see how Plex is handling those. It may be possible to duplicate whatever logic they are using into my plug-in. It will probably be a couple of days before I try this but I will get back to you with what I find out.

I’m not sure what they [Plex] do, but the Documentaries scanner that i linked earlier, cleanly generates always a new episode number (ie. each new episode gets last_episode_number in the tv_series/season +1] ).

for ep in range(episode, endEpisode+1):
print >> sys.stderr, (‘media4:’, show, the_season, ep, title, year)
tv_show = Media.Episode(show, the_season, ep, title, year)
tv_show.display_offset = (ep-episode)*100/(endEpisode-episode+1)
tv_show.parts.append(i)
mediaList.append(tv_show)

This looks like a great plugin that Plex has needed for a looooong time. I’ve been using Plex for over 5 years now I think… Anyways, I tend to collect (among everything else) Tutorials and came looking for a solution to get the file name to be scraped and added to plex because it would be easier to just look at plex than to go digging in the file system for what lessons to skip to or whatever… And fortunately my search brought me here… Downloaded and installed the agent, restarted Plex, and the agent is there… Except it’s not scraping the file names. I even took the space out of the “Lesson 0X” to be precisely what your documentation specifies and it’s still not scraping the filenames… instead it’s using the file modified date…

Attached are screenshots.

For the following image, I took out the extra leading zero from the filename to see if that made any difference… it didn’t.

What am I doing wrong?

What folder have you configured in your Library? I have a dedicated training library configured with a folder like: /share/DATA/Test

The files are named like this: Test/Training_Title/Lesson01/02-Learning_objectives.mp4

I have an entry per training with several season entries based on the lesson folders and in each season a file based on the names.

I added the training stuff to the python scripts some months ago. I currently have limited time to check the code. Maybe mjarends can help you as well in the meantime.

@zed123789 said:
What folder have you configured in your Library? I have a dedicated training library configured with a folder like: /share/DATA/Test

The files are named like this: Test/Training_Title/Lesson01/02-Learning_objectives.mp4

“Organized/” is the folder listed with Plex as the Library folder. I didn’t want to go organize all of the training courses I have for Plex if I wasn’t going to reference all of them… So I created a subdirectory for just the Blender courses I wanted to view and pointed Plex at them.

Now if I get this working I might take a more liberal approach to listing all of my training courses in Plex… lol

As you can see my files are named like this:
/Organized/3D Animation with Blender/Lesson02/01 - Adding Material.mp4

I have an entry per training with several season entries based on the lesson folders and in each season a file based on the names.

If I’m understanding you correctly here, you’re saying it’s not scraping the filenames for the title names, a summary or some such file is. Is that correct?