pannal / Sub-Zero.bundle

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

Series upgrade: SZ did not extract the embedded SRT subtitles. #691

Open cphmichael opened 4 years ago

cphmichael commented 4 years ago

I am running Sub-Zero 2.6.5.3183 DEV

Wed Oct 30 2019 18:16, Sonarr upgraded The Blacklist S07E04, but SZ did not extract the embedded SRT subtitles.

I think this is the known problem we have talked about before. I have therefore attached a lot of information, so maybe you can see what the problem is.


Every 6 hours, the scheduler search for missing subtitles. If SZ is not able to extract embedded subtitles when series are upgraded, then it was my hope that the scheduler would download the missing subtitles - But that does not seem to work.

As you can see, there are available subtitles from addic7ed and opensubtitles, but the scheduler do not download them.


I prefer the embedded SRT over the external downloaded subtitles.

As fare as I remember you told me that the scheduler only search/download external subtitles.

I would therefore ask if you would consider to implement the possibility for the scheduler to extract embedded subtitles?

The scheduler could check if there is a tick in:

and then do the same work as when a media is added. This could be a work-around for the upgrade problem :-)

SZ and XML.zip

nzbget - The Blacklist S07E04

sonarr - History

PMS - The Blacklist S7E4

Krusader - The Blacklist S07

Kitana - The Blacklist S07E04

Kitana - Subtitles - The Blacklist S07E04

Kitana - Scheduler

cphmichael commented 4 years ago

I can see this in the subzero.log.2:

It says that "embedded_subtitles=False" isn't that an error?

cphmichael commented 4 years ago

As far as I remember, you told me earlier that SZ has its own database, where it keeps record of all the downloaded subtitles.

In Kitana I can see an option called "History - Show the last 100 downloaded subtitles"

I assume that the 'History' shows the contents of this database.

If I in Kitana click on "History" and scroll down, I can find The Blacklist S07E04 (auto). It says "English in TV Shows (embedded, score: 0), 2019-10-26 18:37

You can see a screen-dump below of the Sonarr - History for The Blacklist 7x04. As you can see, this is the date of the first Blacklist upload.

There is no entry in the History of the Blacklist upgrade 2019-10-30 18:16

Can that be the reason why SZ do not extract the embedded subtitles, because the database says there already is a subtitle - and that is also the reason why the scheduler not download the available subtitles?

Kitana - History

Sonarr - History

mouzzampk2014-zz commented 4 years ago

I have exactly same questions. Please keep me up to date when you have above solution or answers. Thank you

pannal commented 4 years ago

Upgrades are weird. I've experienced the same; the agent doesn't seem to be reliably called once an upgrade happens to an existing episode, especially when the release type doesn't change.

I'll have a look at the scheduler to add the extraction option.

It says that "embedded_subtitles=False" isn't that an error?

No, that just means that when scanning, it won't consider embedded subtitles as existing/fitting.

pannal commented 4 years ago

I've added automatic extraction of subtitles in the periodic search task for items with missing subtitles, in develop-2.6 just now.

I'm also looking at improving detection of changed media files in the other areas of SZ.

pannal commented 4 years ago

An obvious issue I can immediately spot is, that the upgrade did not change the filename. It stays the same, the new one just changes the sub-tags:

2019-10-30 22:45:41,110 (15496677f700) :  DEBUG (logger:28) - subliminal_patch.refiners.drone: The Blacklist - S07E04 - Kuwait WEBDL-1080p Proper.mkv: Got original file path from Sonarr: The.Blacklist.S07E04.Kuwait.REPACK.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-Obfuscated/a47435189d674786b798123fc2db3da7.mkv
2019-10-30 22:45:41,159 (15496677f700) :  DEBUG (logger:28) - subliminal_patch.refiners.drone: The Blacklist - S07E04 - Kuwait WEBDL-1080p Proper.mkv: Filling attribute release_group: NTb
2019-10-30 22:45:41,159 (15496677f700) :  DEBUG (logger:28) - subliminal_patch.refiners.drone: The Blacklist - S07E04 - Kuwait WEBDL-1080p Proper.mkv: Filling attribute format: WEB-DL

This means that the quick/non-intrusive parts of SZ don't detect the change (e.g.: anything that's not the agent itself, meaning tasks).

pannal commented 4 years ago

I can see this in the subzero.log.2:

2019-10-30 18:23:41,983 (1549655bc700) : DEBUG (scanning:33) - Detecting streams: /media/TVShows/The Blacklist/Season 07/The Blacklist - S07E04 - Kuwait WEBDL-1080p Proper.mkv, external_subtitles=False, embedded_subtitles=False

This is your manual call to list the available subtitles. It will never take any of the existing subtitles into account, so all of those flags are set to False.

Opposed to that, this is what your SearchAllRecentlyAddedMissing task results look like:

2019-10-30 09:22:30,395 (154995d22700) :  DEBUG (scanning:33) - Detecting streams: /media/TVShows/The Blacklist/Season 07/The Blacklist - S07E04 - Kuwait WEBDL-1080p.mkv, external_subtitles=True, embedded_subtitles=True
2019-10-30 09:22:30,395 (154995d22700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/library/metadata/2930'
2019-10-30 09:22:30,404 (154995d22700) :  DEBUG (scanning:113) - Known metadata subtitles: set([])
2019-10-30 09:22:30,404 (154995d22700) :  DEBUG (scanning:114) - Known embedded subtitles: [<Language [en]>]

You've got "Don't search for subtitles of a language if there are embedded subtitles inside the media file (MKV/MP4)?" enabled, don't you? That means it won't search for subtitles if there are any proper subtitles embedded in that configured language.

Edit: clarifications

cphmichael commented 4 years ago

I have installed Sub-Zero 2.6.5.3195 DEV

Yes, I have enabled the "Don't search for subtitles of a language if there are embedded subtitles inside the media file (MKV/MP4)?"

Is that the "scheduler: extract embedded subtitles" that I asked for you have added?

Do I have to enable something to activate this?

pannal commented 4 years ago

Is that the "scheduler: extract embedded subtitles" that I asked for you have added?

The search all recently added missing task now also extracts embedded subs if that's what you're asking, yes.

mouzzampk2014-zz commented 4 years ago

Is that the "scheduler: extract embedded subtitles" that I asked for you have added?

The search all recently added missing task now also extracts embedded subs if that's what you're asking, yes.

Do I need develop branch for this or you will merge this into stable branch? Thanks

pannal commented 4 years ago

For now it's only in the develop-2.6 branch. I'll probably not create a new stable release for a week.

mouzzampk2014-zz commented 4 years ago

For now it's only in the develop-2.6 branch. I'll probably not create a new stable release for a week.

I will leave it as it is for a week unless you want me to test it :)