Local TV Extras Agent

Thank you contrary_cat for providing this excellent plugin! From the clients I have, I think I can confirm that…

Roku supports extras at the show and season, but not episode levels
Android works on all three levels!
AppleTV doesn’t work on any, from what I can tell.

The AppleTV would be the big bummer since that’s what I’ve got in my main living room area. Can anyone else test AppleTV and confirm where (if anywhere) extras show up? I was hoping it would follow the iOS client, so I renamed extras to work at the episode levels.

Has anyone got this to work on a Windows Machine?

I have. Just remember the extras won’t show up in the web app.

Outside of looking through logs, a good way to see if it’s working is to look for duplicate files on episodes - that means they aren’t being properly identified as extras.

Look at the files under information to see which ones are being identified as duplicates of the episode and you will see which files aren’t getting captured. If some of the files are getting captured then you know it’s the file names and not the plugin.

I found that the -extra type didn’t work for me so I switched them to -other and that fixed it.

Does this work with the Windows Client (not the web app). Log seems to be showing my trailer being detected and added, but it doesn’t display at the Show level.

2019-01-11 21:21:23,423 (7f941e7fc700) :  INFO (__init__:89) - Looking for local extras in path: /mnt/pvr/plex/TV/The Legend Of Korra
2019-01-11 21:21:23,427 (7f941e7fc700) :  INFO (__init__:96) - Legend of Korra.mp4
2019-01-11 21:21:23,431 (7f941e7fc700) :  INFO (__init__:52) - Found trailer extra: Legend of Korra
2019-01-11 21:21:23,435 (7f941e7fc700) :  INFO (__init__:129) - /mnt/pvr/plex/TV/The Legend Of Korra/Trailers/Legend of Korra.mp4
2019-01-11 21:21:23,436 (7f941e7fc700) :  INFO (__init__:131) - added 1 extras
2019-01-11 21:21:23,437 (7f941e7fc700) :  INFO (__init__:132) - finished

Server is Ubuntu 18.04, Client is Windows 10.

Thanks.

@Blackpaw29 If you have the client from the Windows app store (this one?), then you may be the first one to test it for TV Extras – I don’t think I’ve had any previous reports for that client.

Plex Media Player for Windows (the one that can be downloaded here: https://www.plex.tv/media-server-downloads/#plex-app) should definitely work properly for TV extras at the show level.

However, I have found that there is one specific situation in PMP where a trailer won’t appear for a TV show: in TV mode only, if you have a flattened show, then this disables the trailer icon; but the full list of extras only show up if there are at least 2 trailers, or 1 of any other kind of extra (which must be the logic associated with movie extras).

So if there is one trailer, no other extras, and a flattened TV show; then the trailer isn’t shown in the TV mode of Plex Media Player.

@ttupa Unfortunately I can confirm that the official Plex App on AppleTV doesn’t show any TV extras.

2 Likes

@contrary_cat My initial testing is with the desktop app (Plex Media Player for Windows). I just gave the App store one a test - definitely not on there :frowning: Actually, I suspect the App store one is abandoned - not updated for a while, doesn’t support collections, a few issues with starting playback. Its a pity because I actually use a windows phone :slight_smile:

Back to the desktop app - I did wonder if my show was part of a collection could be an issue, so I removed from the collection. Still no trailers :frowning:

I don’t use TV mode, so not sure if that applies. I’m running it on my desktop pc, so mouse input is easier.

Whats a flattened show?

nb. My dir layout:

TV\
TV\The Legend Of Korra\Legend of Korra-trailer.mp4
TV\The Legend Of Korra\Season 1\
TV\The Legend Of Korra\Season 2\
TV\The Legend Of Korra\Season 3\
TV\The Legend Of Korra\Season 4\
TV\The Legend Of Korra\Specials\

Also have done Unmatch/Match to reset everything.

Thanks!

@contrary_cat Also I tested with the Android client - trailer does display there!

So based on the log and Android client, it has been properly added to the server and linked at the show level. So if you’re only using the web layout in PMP, then the trailer should show up at the top, between the play and shuffle icons:
Trailer%20icon

A flattened show is when seasons are hidden, e.g. I have my library set to “Hide for single-season series”, and it can also be set on individual TV shows. But if you haven’t deliberately changed one of these settings, then I don’t think the default options would cause a problem.

Ah! I didn’t know about the icon, I thought it was just a text item below the show listings.

So sorry - trailer is showing :slight_smile: In the web client as well.

I do have “Hide for single-season series” set as well, though the show in question is multi-season anyway. I’ll have a play with extras etc tomorrow.

Thanks for all the help and the plugin.

Despite the AppleTV not showing them, I love the plugin! I’ll just watch for Plex to update the client, and keep using my other clients to watch the extras.

@contrary_cat

Tried adding an “Extra” directory, as documented on github - this generated an error in the logging:

Found trailer extra: The Legend of Korra
2019-01-13 10:37:28,080 (7efeb77fe700) :  CRITICAL (agentkit:1078) - Exception in the update function of agent named 'Local TV Extras Agent', called with guid 'com.plexapp.agents.thetvdb://251085?lang=en' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/LocalTVExtras.bundle/Contents/Code/__init__.py", line 183, in update
    FindExtras(metadata, dirs)
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/LocalTVExtras.bundle/Contents/Code/__init__.py", line 125, in FindExtras
    extras.sort(key=lambda e: type_order.index(e['type']))
  File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/LocalTVExtras.bundle/Contents/Code/__init__.py", line 125, in <lambda.1>
    extras.sort(key=lambda e: type_order.index(e['type']))
ValueError: 'extra' is not in list

I changed it to “other” and that worked. Also interestingly, I now have the Trailer and “Other” videos listed under the cast list as I originally expected:

Also, a “Scan Library Files” doesn’t pick up new extra’s, I have to do a “Fix Match” for the show. Is that expected?

Thanks.

Thanks for the log, I found the mistake and it should now be fixed.

Scan Library Files will detect files that conform to the TV Show naming convention, but hopefully not any extras; so that is expected behaviour.

You would need to do a metadata refresh to get the agent to detect the extra videos - I expect that the Fix Match also prompted a full reload of all metadata, so that would be the reason it worked. But “Refresh Metadata” from the same menu would probably be quicker.

1 Like

Ah, I see thanks. Yup “Refresh metadata” picks up new extras.

One thing I noticed for other people who are troubleshooting is when I refresh metadata and see no extras, I can enter a season, go back, then the extras will show up (Chrome web).

Not sure if others have a better way of organizing seasonal content on show level (Since I don’t think plex web does season level), but what I have been doing on Windows is going to the directory in Command Prompt, then typing: for %a in (*) do ren “%a” “S1 - %a”
This allows me to rename all files with the prefix "S1 - " so it doesn’t take forever to do it manually and can at least find which are relevant.

Thanks mate, I wasnt seeing it in the webapp. Checked out all my android devices and everything shows as intended

Thanks @contrary_cat for the plugin. Everything seems to be working well well

Not sure if this is still supported after recent Plex updates or not. I’ve got the plugin installed and I’m not seeing any extras. I used the same naming convention and folder structure that works with movies and I see the movie extras just fine.

It is working for me on PMS version 1.14.1.5488, and according to the announcement here, metadata agents like this one (and scanners) are not being removed – only the browsable plugins.

Try adding a single extra to a single show, and for this test, make sure that it is added at the show level (although Plex Media Server supports adding extras on all levels, Plex Web will only display the ones added at the show level).

So something like:

  • TV Shows
    • Show Name
      • Season 1
      • Season …
      • Extra Name-behindthescenes.mp4

Once you have the files in place, go to the show in Plex Web, and refresh metadata. It must be a metadata refresh rather than scan library files.

If this works for you, then you can try adding a few more extras. If not, then let me know the file structure you’re using (so I can try to duplicate it on my server for testing), and attach the com.plexapps.agents.localtvextras.log file.

Unfortunately this didn’t work for me. I think the issue may be that it isn’t actually installed even though I followed these steps. https://support.plex.tv/articles/201187656-how-do-i-manually-install-a-plugin/. I’m guessing that because I don’t have the log file inside my PMS Plugin logs.

Having installed the agent in the plug-ins folder; go to Settings > Agents; select Shows and then the agent you are using to match your shows (e.g. TVDB or Movie DB)

Is Local TV Extras Agent included in the list? If not, then you are correct that the agent isn’t installed; but if it is in the list, then you may have to tick the box there to enable it.

Alright, we’re getting somewhere now. Attached is the log. Lines 3289-3294 show that extras were added, but I do not see them in the Web UI. You can see I tried things a few different ways as well. com.plexapp.agents.localtvextras.log (370.0 KB)