Local TV Extras Agent

I think that whether the subfolder for episodes and extras would work would depend largely on whether the media scanner picks the episodes up (since this isn’t the expected folder structure).

Assuming that the episode file is found, the starting point for finding extras is the file path of each episode, and from there I try to work back to the season folder (if there is one) and the show folder. The episode subfolder would make it easier to attach extras to an episode, but probably introduce complications in finding the proper level of the season and show folders since I couldn’t always expect the episode subfolders to be present.

Either way it would require a significant redesign, since I don’t have to worry about season or episode numbers at all at the moment.

My hope is that if the Plex developers enable the extras on episode or season level that they’ll update their own local media agent to handle it.

TLDR: Probably possible, but quite complicated

that’s cool.
the default scanner btw. digests episodes following the approach described above (Show Name (year) > Season XX > Show Name (Year) - sXXeYY > Show Name (Year) - sXXeYY.ext)

I’ve been doing some digging in the default plug-ins…
actually it’s all there and works for tv show local media assets exactly as it does for movies… all you need to do is change 1 line in localmedia.py. and of course – as stated by @contrary_cat – the clients need to support it which they only do on show level but not for season/episode extras.

Plex for Android will even show the extras on show and episode level (but not for seasons – from what I can see at the moment; maybe there’s still some quirks to be worked out)

@tom80H Try my Absolute Series Scanner Beta branch, it should support funky folders inside season folders
https://github.com/ZeroQI/Absolute-Series-Scanner/blob/Beta/Scanners/Series/Absolute%20Series%20Scanner.py
Please report to my agent thread: http://forums.plex.tv/discussion/113967/absolute-series-scanner-for-anime-mainly#latest

Any updates?

Hey @tom80H Which line of code should be changed to support the scanning? Or do I still need to use the Local TV Extras Agent?

I can’t look up a local version at the moment, but based on the github version, Line 119 restricts it to movies only.

I don’t know exactly how @tom80H altered it, but I’d suggest replacing if find_extras and type == 'movie' with if find_extras and (type == 'movie' or type == 'show')

(The other relevant types are season and episode)

That’s how I started out with this agent, but during testing I had some issues with it adding some videos that were outside my chosen media folder - so I’d suggest being very careful with your folder structure.

I’ve been trying to use this for a bunch of extras I ripped off of a DVD with no luck so far. I have my extras in a “Specials” folder under the TV show directory with names like this: “Degrassi - S00E09 - On the Casting Couch: Lauren Collins as Paige Michalchuk (S01).mkv”. I can see the plugin in my agents list and have it enabled, but the episodes are simply labeled as “Episode XX”. My example episode has the label “Episode 9” in the Specials section of the show. I’m running Linux - not sure if that’s related to the problem.

Hi @Dan_Saba, the problem is the folder naming, it needs to be one of: Trailer, Deleted, Behind the Scenes, Interview, Scene, Featurette, Short, or Other (capitalisation optional).

Hope this helps

@contrary_cat Just tried this with an “Interview” folder with no luck. The item simply disappears from the show altogether.

@Dan_Saba, this may be a silly question - but did you Refresh Metadata on the show after changing the folder name.

If that didn’t work, you could try a plural “Interviews”. Since the code only requires that the folder start with one of the listed words, that’s how I typically name that folder.

If none of that helps, then you could check the com.plexapp.agents.localtvextras.log - search for your file name, and see if the agent has found it.

@contrary_cat Changing the folder name seems to have done the trick. Thanks!

You could add an empty Start() function to the __init__.py file to avoid that error. What documentation I have seen uniformly says that the Start() function is required. But, if you don’t need it to do anything, I think you could just add def Start():pass to that file.

@zoltair yes, adding a def Start():pass line removes the CRITICAL line from the log.

The current version of the agent is functional, but if I make an update in future then I’ll include that line - thanks :slightly_smiling_face:

Any updates on the possibility of adding extras to seasons and the show? Thanks!

Hey guys, is this something that is going to be part of a future Plex update or is it only installed as an external plugin?

Thanks!

Just to note, this works great in a web browser but not for Apple TV / IOS apps. I presume this is because the client needs to support it too?

Yes, of the clients that I have: Plex/Web and Plex Media Player (2) support extras at the show level only; while the new ios app supports extras at the episode level only, for some reason.

The older ios app did support TV extras at the show level, so that seems to be a bit of a regression.

I have been told that Android clients support TV extras at all three levels: show, season and episode. If anyone has other clients, perhaps we can start to build a list of what is supported for each one.

I’m not affiliated with Plex, so this particular agent is a 3rd party one which has to be installed externally.

If the Plex team created their own solution, then that would be part of a future update; but I don’t know if, or when that might be.

I am currently working (slowly) on a version that will support linking local extras to all levels - though it seems this will fully work only for Android clients.

If anyone is interested in testing this - and has a client that will support it - could they send me a message? I’ll start a separate testing thread if there’s a few people.