Recorded TV Shows and subtitles

I really like how the DVR works but I needed subtitles for the recorded TV Shows. So like a temporal solution I added CCExtractor script that creates .srt file automatically, after the show is recorded. Everything worked fine until I started recording date based TV shows.
The DVR names them differently, like this:
“CBS This Morning (2012) - 2017-09-13 00 00 00 - Episode 09-13.ts”
and CCExtractor creates:
“CBS This Morning (2012) - 2017-09-13 00 00 00 - Episode 09-13.en.srt”

For some reason TV Shows libraries do not show subtitles for shows with such naming. If I move it to the Video library it works like expected (I can select the subtitles). Do you have any idea why is it so and how to fix that?

PMS Version 1.9.0.4252 (before was 1.8.4.4249, the same behavior).

The Local Media Agent doesn’t accept then this way?

Can you show me the XML for that episode?

Similar problem as mentioned in this thread:

If I read the info in that posting correctly, it appears date based season were disabled for the local media agent some time ago.

Sorry — no intention to hi-jack a thread, but at least we have a response here ( @ChuckPA ) and any resolution that might work here could help in the other situation. :slight_smile:

@ChuckPA said:
The Local Media Agent doesn’t accept then this way?

Can you show me the XML for that episode?

It seems so.
When I was playing with it I deleted that episode, but I just recorded a new one:
“Charlie Rose (1991) - 2017-09-14 00 00 00 - Episode 09-14.ts”
Please see the attached file.

Thanks for the XML… the LMA really didn’t pick it up.

Is that a documented change or did it get broken and never fixed?

That’s probably explains it: https://github.com/plexinc-agents/LocalMedia.bundle/commit/b3f7b1461e6bb987e2b8be5bf383a96e76617198

“If we’ve got a date based season, ignore it for now, otherwise it’ll collide with S/E folders/XML and PMS prefers date-based (why?)”

Well, I modified this file “C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-d07c1f408\LocalMedia.bundle\Contents\Code\init.py” and now it works fine.

The modified version in the attachment (PMS Version 1.9.0.4252).

I read the GitHub commits. It makes no sense to me.

Please show me how your resultant files look ?

I will include all this when I submit to Engineering to put it back.

I modified only “_init_.py”. It’s attached to previous post.

Sorry about that… I had asked for the code but missed your post. You got the email before I had chance to edit my post. :smiley:

Thank you.

How are your files named? May I have an in-thread sample listing for engineering to see? ( I will be linking this thread directly in my submittal )

To reproduce the bug you can simply take any .ts file with .srt and name them:
Today (1952) - 2017-09-15 00 00 00 - Episode 09-15.ts
Today (1952) - 2017-09-15 00 00 00 - Episode 09-15.en.srt
Then put them in the folder:
TV Shows\Today (1952)\Season 2017\

@nshvydky – if you re-mux the file as an mkv, and embed the subtitles as well as the audio and video in the mix, the subtitles will show up. External srt files seem to be the problem.

A workaround for now, but I think the bug has been around for a couple of years. It might not get a lot of attention as it looks to me it was deliberately disabled for some reason.

It also affects all files, not just .ts files and that includes mkv, and mp4.

Change request submitted to Engineering.

@leelynds said:
@nshvydky – if you re-mux the file as an mkv, and embed the subtitles as well as the audio and video in the mix, the subtitles will show up. External srt files seem to be the problem.

A workaround for now, but I think the bug has been around for a couple of years. It might not get a lot of attention as it looks to me it was deliberately disabled for some reason.

It also affects all files, not just .ts files and that includes mkv, and mp4.

Yes, the problem only is with the date based naming: https://support.plex.tv/hc/en-us/articles/200381053-Naming-Date-based-TV-Shows?mobile_site=true
The LMS agent just does not look for external subtitles if show name is date based. But works fine if it is series and season naming.
I guess it would be much better if in case there is a .srt file with the exactly same name like the video file then it would use it regardless of the naming type (even if it’s incorrect).