pannal / Sub-Zero.bundle

Subtitles for Plex, as good you would expect them to be.
Other
1.76k stars 120 forks source link

Subtitles appearing twice in Plex (actual files are OK though) #712

Open fevangelou opened 4 years ago

fevangelou commented 4 years ago

This is my first post here, so let me say thank you for maintaining the most useful Plex plugin.

This specific issue with subtitle duplication in the UI has occurred a little less than a month ago, when I had a look at the SZ settings (in case something new was added), updated a couple of entries and re-saved them.

Although the actual files are single (important), this is how they appear in Plex (on both desktop and TVs):

Screenshot 2020-01-23 at 22 29 35

I've rechecked SZ settings in case some could cause this duplication, but I don't see anything wrong.

The Plex server is the latest version running on Ubuntu 18.04.

Any ideas or setting I'm missing?

schwulerbro commented 4 years ago

I've noticed this too and I'm running on Mac OSX 10.14

pannal commented 4 years ago

How are your settings here? How strict should these subtitles existing on the filesystem be detected?

ukdtom commented 4 years ago

And adding to @pannal here:

Please show the XML for the example above Ref: https://support.plex.tv/articles/201998867-investigate-media-information-and-formats/#toc-1

fevangelou commented 4 years ago

@pannal As requested, here's mine: https://jmp.sh/ivPv39A

@ukdtom Sample XML for a movie with 2 subtitles pre-uploaded (SZ did not fetch new ones): https://pastebin.com/H0DDPcLJ - you'll notice that 4 are referenced with a minor change in the XML attributes. As mentioned already, only 2 srt files exist along with the mp4 file: https://jmp.sh/gTR8Cms

fevangelou commented 4 years ago

As a sidenote, this suddenly occurred without having updated Plex version to the latest release (it was 2-3 versions behind). I don't know if apt-get dist-upgrade upgrades Plex to some minor version which may have caused the issue, but even after I updated to the very latest release (by installing the .deb file last week) the issue is still there. Perhaps a Plex bug?

ukdtom commented 4 years ago

Interesting..... When looking at the two English subs, the difference between them is that one has a format element, the other hasn't. And they do have a different key

When said, a plain external sub should not be allowed twice for the same language, since the second one added should simply take precedence

So yes, I smell a Plex bug ;)

What happens, if you move the external English sub away, and then refresh? Does both go away then?

pannal commented 4 years ago

Don't set the setting you screenshotted to any, please. Set it to strict, then refresh the Metadata of the item in question.

If it doesn't go away after that, I'll take a deeper look.

Many people tend to set that setting to any, but that's normally not what you want.

pannal commented 4 years ago

Did you recently also update your SZ after a long time? Are you running a dev version or the official one?

fevangelou commented 4 years ago

@ukdtom If I delete an .srt, the plugin will fetch a new one. Entries will still show up double, as I've tested this with subtitles loaded only from SZ.

@pannal According to your docs, the plugin is auto-updated. Since the server is on a datacenter, online 24/7, I presume it's up to date. Let me know if/how I could verify its version. I had never installed the dev version, for the record.

I also changed the matching setting (as you requested) first to "loose" then to "exact" and after refreshing metadata a few times, I still see 4 entries.

In any case, beyond fetching the files, does SZ register them in some Plex DB? In other words, would this be a SZ bug or a Plex bug? Cause if SZ merely fetches the files and it's Plex's job to read the subtitle files and present them as a list in the UI, then it's more likely a Plex issue...

pannal commented 4 years ago

SZ uses the storage plex offers to register the subtitles it detected. That's in order to support subtitles in subfolders, which plex doesn't support.

It shouldn't create duplicates, where do you store your subtitles by default? Besides the media file?

Edit: I just checked, you store them besides the media file. Can you get me the SZ logs zipped after refreshing the item in question?

fevangelou commented 4 years ago

Since the UI in Plex has changed on the new Plex client, I can't get the logs per the docs (https://github.com/pannal/Sub-Zero.bundle/wiki/Logs). I assume I can directly access them on Ubuntu. Where should I look?

fevangelou commented 4 years ago

Looks like the logs are here: /var/lib/plexmediaserver/Library/Application%20Support/Plex%20Media%20Server/Logs/PMS%20Plugin%20Logs/com.plexapp.agents.subzero.log

Attaching all such files here: https://jmp.sh/bQOdROQ

fevangelou commented 4 years ago

I just noticed the following: a movie with no previous subtitles uploaded, had a single subtitle (for English) fetched by SZ and the Plex subtitles UI entry correctly shows a single subtitle.

Perhaps then the error occurs with pre-existing subtitles only.

pannal commented 4 years ago

Hmm. I can't see any triggers of SZ since the 21st of January. Are you sure you're refreshing the metadata properly?

You might set the logging level of SZ to DEBUG (at the bottom of SZ's settings) and refresh the metadata of the item in question again, then wait a couple of minutes and re-post the logs.

Do you have any other subtitle providers enabled, such as OpenSubtitles?