Subtitle issue with TV shows

Hi,

I have encountered a strange issue with external subtitles and TV shows which I believe to be a bug.

If in the folder for a season there is only the video file for the last episode present, but the subtitles for all episodes (I delete the video file after watching, unfortunately the corresponding subtitle file is not deleted along with it), then the Plex server offers all of the subtitles for the last episode. I hope that’s understandable.

To make it more tangible, here is the directory listing and the log file when opening the episode in Plex web:

Directory listing:
[/Volumes/Media/Serien/Orphan Black/Season 3]> ls -1
Orphan Black - S03E01.eng.srt
Orphan Black - S03E02.eng.srt
Orphan Black - S03E03.eng.srt
Orphan Black - S03E04.eng.srt
Orphan Black - S03E05.eng.srt
Orphan Black - S03E06.eng.srt
Orphan Black - S03E07.eng.srt
Orphan Black - S03E08.eng.srt
Orphan Black - S03E09.eng.srt
Orphan Black - S03E10.eng.srt
Orphan Black - S03E10.mkv

Log extract:
2017-11-01 22:22:30,754 (7000029b8000) : INFO (localmedia:275) - Looking for subtitle media in 1 paths with 1 media files.
2017-11-01 22:22:30,755 (7000029b8000) : INFO (localmedia:276) - Paths: /Volumes/Media/Serien/Orphan Black/Season 3
2017-11-01 22:22:30,756 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E07.eng.srt language: en codec: srt format: srt default: forced:
2017-11-01 22:22:30,757 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E03.eng.srt language: en codec: srt format: srt default: forced:
2017-11-01 22:22:30,758 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E10.eng.srt language: en codec: srt format: srt default: forced:
2017-11-01 22:22:30,759 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E02.eng.srt language: en codec: srt format: srt default: forced:
2017-11-01 22:22:30,760 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E08.eng.srt language: en codec: srt format: srt default: forced:
2017-11-01 22:22:30,762 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E05.eng.srt language: en codec: srt format: srt default: forced:
2017-11-01 22:22:30,763 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E04.eng.srt language: en codec: srt format: srt default: forced:
2017-11-01 22:22:30,764 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E01.eng.srt language: en codec: srt format: srt default: forced:
2017-11-01 22:22:30,765 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E06.eng.srt language: en codec: srt format: srt default: forced:
2017-11-01 22:22:30,766 (7000029b8000) : INFO (subtitlehelpers:143) - Found subtitle file: /Volumes/Media/Serien/Orphan Black/Season 3/Orphan Black - S03E09.eng.srt language: en codec: srt format: srt default: forced:

Any idea about this?

Thanks,
Max

1 Like

Actually I can answer my own question. :smiley:

I did some digging and found the localmedia.pylines 291-295 to be the culprit:
# If we have more than one media file within the folder and located filename doesn't match
# exactly then we should simply ignore it.
#
if total_media_files > 1 and not filename_matches_part:
continue

If I change this to if not filename_matches_part: everything works as I would expect it to. Now a dev has to say if this change makes sense or if I am totally missing a feature here… :wink:

This is so annoying, for some shows i font have 1 folder per each episode and the list of subs is so long.

This issue is also present even if you don’t delete the watched episodes, i see it if i don’t have each episode in a separate folder, on Windows 10 too

I just hit this bug!
Is there a better way to file bugs with Plex than forum posts?

There is no bug here.

  • Plex doesn’t support ‘one subfolder per episode’, like one of the above posters has. See https://support.plex.tv/articles/200220687-naming-series-season-based-tv-shows/
  • Plex requires the subtitle file being named identically to the corresponding video file (apart from the language code and the file name extension, of course)
  • Plex does not support the subtitles being stored in an additional subfolder

see https://support.plex.tv/articles/200471133-adding-local-subtitles-to-your-media/

1 Like

Hello,

You seem rather sure that this is not a bug (but a feature) :slight_smile:
I believe that my media is named and organised as per best practice however my external subs doesn’t get matched properly to the media.
See this screenshot of the subtitle list for an episode: https://screencast.com/t/93AlrppD
And this screenshot of my folder: https://screencast.com/t/5i4hhSda

I tend to disagree with you whether it’s a bug or not, unless you might be able to tell me what I am doing wrong?

Cheers.

Allan

Are you using SubZero perhaps?
This looks like a known issue with that agent.

Yes, I am using SubZero.

And I just stumbled upon this old thread: TV Shows - Episode Name

Might it be solved by skipping the episode title in the file name and move the TVDB agent above the Local metadata agent?

No, this thread has nothing to do with the issue.
Please go to SubZero and ask in there.

1 Like

Awesome! I have found a solution to my issue thanks to you.
I went to the SubZero category and read this in the introduction:

Use the following agent order:

  1. Sub-Zero Subtitles (TV/Movies)
  2. Local Media Assets (TV/Movies)
  3. anything else

Needless to say I did not have that order.

I just tested it after having done the dance which I realised was necessary. And it now matches the external subs as expected again. Yay!

2019-03-02T21:02:00Z
UPDATE
Back to square one. Presumably I was too fast celebrating.
This did not fix the issue after all.
Moving on…

2019-03-02T21:18:00Z
UPDATE SOLVED
Finally! Here was my solution: All subtitles in list when selecting in plex · Issue #552 · pannal/Sub-Zero.bundle · GitHub