Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Audio stream language exception list #756

Closed
UniverseDevel opened this issue Jan 16, 2021 · 21 comments
Closed

Audio stream language exception list #756

UniverseDevel opened this issue Jan 16, 2021 · 21 comments

Comments

@UniverseDevel
Copy link

Hi,

adding a field where you could provide comma-separated ISO-639-1 codes for main or any audio stream languages, that subtitles would not be downloaded, could be a great addition to this awesome tool. I am having a multiple titles in language that subtitles are not needed, yet sub-zero downloads them anyway and usually they are incorrect. I know there is possibility to exclude this title with ".sz" file but mentioned feature would be much easier to use in case I have quite a lot of such titles.

Also option to switch and support to ISO 639-2 would be awesome as well.

Thank you.

@pannal
Copy link
Owner

pannal commented Jan 24, 2021

Good idea. Not too hard to implement. Expect this soon.

@UniverseDevel
Copy link
Author

UniverseDevel commented Jan 25, 2021

One more thing, its not actually that important but it would provide an easier way how to check for SZ version. Currently I have to navigate to SZ plugin directory and check Info.plist file for version (I haven't found it elsewhere). Could there be a version number mentioned in Settings interface in Plex?

@pannal
Copy link
Owner

pannal commented Mar 8, 2021

adding a field where you could provide comma-separated ISO-639-1 codes for main or any audio stream languages, that subtitles would not be downloaded, could be a great addition to this awesome tool. I am having a multiple titles in language that subtitles are not needed, yet sub-zero downloads them anyway and usually they are incorrect.

image

Am I missing something or is that already supported?

One more thing, its not actually that important but it would provide an easier way how to check for SZ version. Currently I have to navigate to SZ plugin directory and check Info.plist file for version

How are you installing SZ? It's listed in the official plugin repository, thus, when SZ is installed without DEV mode, it will get auto updated.

@UniverseDevel
Copy link
Author

adding a field where you could provide comma-separated ISO-639-1 codes for main or any audio stream languages, that subtitles would not be downloaded, could be a great addition to this awesome tool. I am having a multiple titles in language that subtitles are not needed, yet sub-zero downloads them anyway and usually they are incorrect.

image

Am I missing something or is that already supported?

I tried that feature and it didn't work as expected. Lets say Subtitle (1) is set to English as I want to download only English subtitles and I don't want subtitles for audio in Czech, Slovak and Undefined (titles without audio; btw, there is no code for that in ISO-639-1 but is in ISO-639-2 as ZXX) which are configured in "Additional Subtitle Languages" for option "Download subtitles" to work. As all my titles have only one audio (and that's a rule) I set "Download subtitles" to "When main audio stream is not any configured language", this also exclude English which I want it to download. Now, I tried to remove English and set lets say Czech in its place, but instead of English subtitles it downloaded subtitles in Czech and Slovak because main audio was English. It worked correctly for titles in Czech and Slovak but was not working correctly for 99% of other titles that are in English.

Options you mentioned mix title audio language with subtitle language together and they are two separate entities. Therefore I was proposing an field for dedicated audio language exclusion not subtitle language inclusion/exclusion which is in place.

One more thing, its not actually that important but it would provide an easier way how to check for SZ version. Currently I have to navigate to SZ plugin directory and check Info.plist file for version

How are you installing SZ? It's listed in the official plugin repository, thus, when SZ is installed without DEV mode, it will get auto updated.

It is installed as per instructions here and I believe it is updating correctly, what I miss is some reference point in UI to be able to say "Ah, version changed from X to Y there are some changes let me see if change log contains feature that I expect it to be there".

pannal added a commit that referenced this issue Mar 9, 2021
- add option to not download subtitles for certain audio languages existing; and/or no audio stream
@pannal
Copy link
Owner

pannal commented Mar 9, 2021

Should be fixed in the latest dev 2.6 version.

Please test it, afterwards I'll release the latest version.

@pannal
Copy link
Owner

pannal commented Mar 9, 2021

Keep in mind: The implementation was of the simpler sort, meaning: a force refresh will still ignore this setting. I might change that sometime.

@UniverseDevel
Copy link
Author

UniverseDevel commented Mar 10, 2021

Hi,

sorry for the delay. I installed Dev branch and have removed subtitles for three titles that all had subtitles downloaded via SubZero. One title has English audio, the second has Slovak audio and last one is mute movie only with some music so audio is marked as Not Applicable (ISO-639-2 code zxx). I don't have any title without audio stream so I am unable to test NULL option. Configuration was adjusted for English subtitles to be downloaded for any language except Czech, Slovak, Not Applicable (zxx) and NULL (as per picture below). I also configured DEBUG output so I can verify actions in log.

image

After refreshing metadata for title with Slovak audio I noticed a debug message in log (see below) and no subtitles were downloaded. This behaviour is as expected. Same goes for title with Not Applicable (zxx) audio.

DEBUG (download:73) - Skipping subtitle search for <Movie ['...', ...]>, ignoring due to existing audio streams: set([<Language [sk]>])
DEBUG (download:73) - Skipping subtitle search for <Movie ['...', ...]>, ignoring due to existing audio streams: set([<Language [zxx]>])

After refreshing metadata for title with English audio, there are no subtitles downloaded and that seems to be wrong. Log messages are below. Just to be sure, I manually checked only two places that this title can have subtitles stored in and there are none.

EDIT: I tested this also on different title than with English audio that should have subtitles downloaded and result is the same.

DEBUG (scheduler:67) - Task data cleared: MissingSubtitles
DEBUG (download:72) - We have at least one external subtitle for any configured language.
DEBUG (download:152) - All languages for all requested videos exist. Doing nothing.

image

@UniverseDevel
Copy link
Author

Also some log messages are a bit weird, but that might not be important:

...
DEBUG (logger:28) - subzero.video: Parsing video: The Line (2017).mp4, hints: {'type': 'movie', 'title': u'\u010ciara'}
INFO (logger:38) - subliminal_patch.core: Determining basic video properties for 'The Line (2017).mp4' in '/data/media/Movies/The Line (2017)'
DEBUG (logger:28) - subliminal_patch.core: GuessIt found: {
    "title": "The",
    "other": "LiNE",
    "year": 2017,
    "container": "mp4",
    "mimetype": "video/mp4",
    "type": "movie"
}
...
DEBUG (logger:28) - subliminal_patch.core: external subs: scanning path /data/media/Movies/The Line (2017)/The Line (2017).mp4
...
DEBUG (download:73) - Skipping subtitle search for <Movie ['The', 2017]>, ignoring due to existing audio streams: set([<Language [sk]>])

Title is called The Line or Čiara, GuessIt found "title": "The", and that is being used later in "Skipping subtitle search for <Movie ['The', 2017]>". Also log line "subliminal_patch.core: external subs: scanning path" is scanning a path but the log contains path to a file not a folder.

@pannal
Copy link
Owner

pannal commented Mar 10, 2021

So the feature works as expected?

@UniverseDevel
Copy link
Author

As I mentioned before, I don't think so. The new feature works fine but I think subtitle downloading for rest got somehow broken:

After refreshing metadata for title with English audio, there are no subtitles downloaded and that seems to be wrong. Log messages are below. Just to be sure, I manually checked only two places that this title can have subtitles stored in and there are none.

EDIT: I tested this also on different title than with English audio that should have subtitles downloaded and result is the same.

DEBUG (scheduler:67) - Task data cleared: MissingSubtitles
DEBUG (download:72) - We have at least one external subtitle for any configured language.
DEBUG (download:152) - All languages for all requested videos exist. Doing nothing.

image

@pannal
Copy link
Owner

pannal commented Mar 10, 2021

DEBUG (scheduler:67) - Task data cleared: MissingSubtitles
DEBUG (download:72) - We have at least one external subtitle for any configured language.
DEBUG (download:152) - All languages for all requested videos exist. Doing nothing.

This doesn't necessarily mean it doesn't work. Can you refresh the item in question, then post the logs again?

@UniverseDevel
Copy link
Author

As I said, these are the logs for title that I refreshed metadata for after removing subtitles manually, for SubZero to download them again and SubZero didn't download anything and in log could be found those three lines.

SubZero now says that there is everything in place "We have at least one external subtitle for any configured language." but there are not subtitles for this title at all (as per screenshot attached). When I tested SubZero before on this very same title, this steps resulted in SubZero re-downloading this subtitles. That's not happening now.

@pannal
Copy link
Owner

pannal commented Mar 10, 2021

Please refresh the item in question via Plex UI, then post the logs again.

@UniverseDevel
Copy link
Author

2021-03-10 15:43:10,098 (-4ff02ba0) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.subzero/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2IwczYKbWFudWFsYjBzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M1Ck1vdmllczEwCm1lZGlhX3R5cGU1Cm5zOApwYXJlbnRJRHM0Mwpjb20ucGxleGFwcC5hZ2VudHMuaW1kYjovL3R0MDEwMzYzOT9sYW5nPWVuczQKZ3VpZGIxczUKZm9yY2VzMjMKY29tLnBsZXhhcHAuYWdlbnRzLmltZGJzMTMKcHJpbWFyeV9hZ2VudHM1CjU4MDE4czIKaWRyMAo_
2021-03-10 15:43:10,102 (-4ff02ba0) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.subzero/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2IwczYKbWFudWFsYjBzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M1Ck1vdmllczEwCm1lZGlhX3R5cGU1Cm5zOApwYXJlbnRJRHM0Mwpjb20ucGxleGFwcC5hZ2VudHMuaW1kYjovL3R0MDEwMzYzOT9sYW5nPWVuczQKZ3VpZGIxczUKZm9yY2VzMjMKY29tLnBsZXhhcHAuYWdlbnRzLmltZGJzMTMKcHJpbWFyeV9hZ2VudHM1CjU4MDE4czIKaWRyMAo_
2021-03-10 15:43:10,104 (-4ff02ba0) :  INFO (agentkit:961) - Searching for matches for {'id': '58018', 'guid': 'com.plexapp.agents.imdb://tt0103639?lang=en', 'force': True, 'primary_agent': 'com.plexapp.agents.imdb', 'parentID': None}
2021-03-10 15:43:10,109 (-4ff02ba0) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/58018/tree'
2021-03-10 15:43:10,123 (-4ff02ba0) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.imdb://tt0103639?lang=en
2021-03-10 15:43:10,125 (-4ff02ba0) :  DEBUG (model:234) - Deserializing from /config/Library/Application Support/Plex Media Server/Metadata/Movies/3/4b5d1fe5caf023754751433ec96e49d4eae70b6.bundle/Contents/com.plexapp.agents.imdb/Info.xml
2021-03-10 15:43:10,149 (-4ff02ba0) :  DEBUG (__init__:117) - Sub-Zero 2.6.5.3254 DEV, movies search
2021-03-10 15:43:10,153 (-4ff02ba0) :  DEBUG (runtime:924) - Response: [200] str, 600 bytes
2021-03-10 15:43:10,164 (-4ff02ba0) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.subzero/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo1ODAxOHM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczUKTW92aWVzMTAKbWVkaWFfdHlwZXM0Mwpjb20ucGxleGFwcC5hZ2VudHMuaW1kYjovL3R0MDEwMzYzOT9sYW5nPWVuczQKZ3VpZHM0Cm51bGxzMgppZHIwCg__
2021-03-10 15:43:10,167 (-4ff02ba0) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.subzero/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMTAKczIKZW5zNApsYW5nYjFzNQpmb3JjZWIwczgKcGVyaW9kaWNzNQo1ODAxOHM0CmRiaWRpMApzNwp2ZXJzaW9ubnMxMApwYXJlbnRHVUlEbnM4CnBhcmVudElEczUKTW92aWVzMTAKbWVkaWFfdHlwZXM0Mwpjb20ucGxleGFwcC5hZ2VudHMuaW1kYjovL3R0MDEwMzYzOT9sYW5nPWVuczQKZ3VpZHM0Cm51bGxzMgppZHIwCg__
2021-03-10 15:43:10,169 (-4ff02ba0) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.imdb://tt0103639?lang=en
2021-03-10 15:43:10,170 (-4ff02ba0) :  DEBUG (model:234) - Deserializing from /config/Library/Application Support/Plex Media Server/Metadata/Movies/3/4b5d1fe5caf023754751433ec96e49d4eae70b6.bundle/Contents/com.plexapp.agents.subzero/Info.xml
2021-03-10 15:43:10,174 (-4ff02ba0) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/58018/tree'
2021-03-10 15:43:10,184 (-4ff02ba0) :  DEBUG (__init__:128) - Sub-Zero 2.6.5.3254 DEV, movies update called
2021-03-10 15:43:10,200 (-4ff02ba0) :  INFO (datakit:131) - Saved the dictionary file
2021-03-10 15:43:10,201 (-4ff02ba0) :  DEBUG (config:1168) - Patching subliminal ...
2021-03-10 15:43:10,205 (-4ff02ba0) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/58018'
2021-03-10 15:43:10,358 (-4ff02ba0) :  INFO (localmedia:140) - Looking for subtitle media in 2 paths with 1 media files.
2021-03-10 15:43:10,359 (-4ff02ba0) :  INFO (localmedia:141) - Paths: /data/media/Movies/Aladdin (1992), /data/media/=Need to be processed/=SUBTITLES
2021-03-10 15:43:10,375 (-4ff02ba0) :  INFO (datakit:131) - Saved the dictionary file
2021-03-10 15:43:10,385 (-4ff02ba0) :  INFO (datakit:131) - Saved the dictionary file
2021-03-10 15:43:10,395 (-4ff02ba0) :  INFO (datakit:131) - Saved the dictionary file
2021-03-10 15:43:10,396 (-4ff02ba0) :  DEBUG (scanning:157) - Determining force-refresh (video: 58018, series: None, season: None), result: False
2021-03-10 15:43:10,398 (-4ff02ba0) :  DEBUG (scanning:33) - Detecting streams: /data/media/Movies/Aladdin (1992)/Aladdin (1992).mp4, account_for_external_subtitles=True, account_for_embedded_subtitles=False
2021-03-10 15:43:10,399 (-4ff02ba0) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/58018'
2021-03-10 15:43:10,430 (-4ff02ba0) :  DEBUG (scanning:113) - Known metadata subtitles: set([])
2021-03-10 15:43:10,431 (-4ff02ba0) :  DEBUG (scanning:114) - Known embedded subtitles: []
2021-03-10 15:43:10,579 (-4ff02ba0) :  DEBUG (logger:28) - subzero.video: Parsing video: Aladdin (1992).mp4, hints: {'type': 'movie', 'title': 'Aladdin'}
2021-03-10 15:43:10,581 (-4ff02ba0) :  INFO (logger:38) - subliminal_patch.core: Determining basic video properties for 'Aladdin (1992).mp4' in '/data/media/Movies/Aladdin (1992)'
2021-03-10 15:43:10,620 (-4ff02ba0) :  DEBUG (logger:28) - subliminal_patch.core: GuessIt found: {
    "title": "Aladdin",
    "year": 1992,
    "container": "mp4",
    "mimetype": "video/mp4",
    "type": "movie"
}
2021-03-10 15:43:10,648 (-4ff02ba0) :  INFO (scanning:128) - Found audio streams: en
2021-03-10 15:43:10,650 (-4ff02ba0) :  DEBUG (logger:28) - subzero.video: Determining existing subtitles for /data/media/Movies/Aladdin (1992)/Aladdin (1992).mp4
2021-03-10 15:43:10,651 (-4ff02ba0) :  DEBUG (logger:28) - subliminal_patch.core: external subs: scanning path /data/media/Movies/Aladdin (1992)/Aladdin (1992).mp4
2021-03-10 15:43:10,660 (-4ff02ba0) :  DEBUG (logger:28) - subliminal_patch.core: Found subtitles {}
2021-03-10 15:43:10,661 (-4ff02ba0) :  DEBUG (logger:28) - subliminal_patch.core: external subs: scanning path /data/media/=Need to be processed/=SUBTITLES/Aladdin (1992).mp4
2021-03-10 15:43:10,688 (-4ff02ba0) :  DEBUG (logger:28) - subliminal_patch.core: Found subtitles {u'Robot Chicken - Star Wars Episode II (2008) Extended.en.srt': <Language [en]>}
2021-03-10 15:43:10,690 (-4ff02ba0) :  DEBUG (logger:28) - subliminal_patch.core: external subs: found {u'Robot Chicken - Star Wars Episode II (2008) Extended.en.srt': <Language [en]>}
2021-03-10 15:43:10,697 (-4ff02ba0) :  INFO (datakit:131) - Saved the dictionary file
2021-03-10 15:43:10,698 (-4ff02ba0) :  DEBUG (scheduler:67) - Task data cleared: MissingSubtitles
2021-03-10 15:43:10,702 (-4ff02ba0) :  DEBUG (download:72) - We have at least one external subtitle for any configured language.
2021-03-10 15:43:10,827 (-4ff02ba0) :  DEBUG (download:152) - All languages for all requested videos exist. Doing nothing.
2021-03-10 15:43:10,829 (-4ff02ba0) :  DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/58018'
2021-03-10 15:43:11,012 (-4ff02ba0) :  INFO (localmedia:140) - Looking for subtitle media in 2 paths with 1 media files.
2021-03-10 15:43:11,013 (-4ff02ba0) :  INFO (localmedia:141) - Paths: /data/media/Movies/Aladdin (1992), /data/media/=Need to be processed/=SUBTITLES
2021-03-10 15:43:11,025 (-4ff02ba0) :  INFO (datakit:131) - Saved the dictionary file
2021-03-10 15:43:11,032 (-4ff02ba0) :  INFO (datakit:131) - Saved the dictionary file
2021-03-10 15:43:11,033 (-4ff02ba0) :  DEBUG (config:433) - Syncing cache
2021-03-10 15:43:11,037 (-4ff02ba0) :  DEBUG (model:229) - Serializing to /config/Library/Application Support/Plex Media Server/Metadata/Movies/3/4b5d1fe5caf023754751433ec96e49d4eae70b6.bundle/Contents/com.plexapp.agents.subzero/Info.xml
2021-03-10 15:43:11,039 (-4ff02ba0) :  DEBUG (runtime:924) - Response: [200] str, 16 bytes

@pannal
Copy link
Owner

pannal commented Mar 10, 2021

Is Aladdin the file in question? It finds Robot Chicken - Star Wars Episode II (2008) Extended.en.srt for that in /data/media/=Need to be processed/=SUBTITLES.

That seems to be the issue here. How are your match settings?

image

@UniverseDevel
Copy link
Author

Is this a new option? After changing it, it started to work but I don't remember changing that when I was using master branch, value that I had there was 'Any'.

Right now everything seems to be working as expected.

@pannal
Copy link
Owner

pannal commented Mar 10, 2021

Great. No the option is relatively old, and its default is "loose".

@UniverseDevel
Copy link
Author

Thank you for your time and dedication! There is some beer on the way to you. ;)

@pannal
Copy link
Owner

pannal commented Mar 10, 2021

Cheers!

@pannal pannal closed this as completed Mar 10, 2021
@UniverseDevel
Copy link
Author

Hi, any idea when will next version be released? Last release seems to be almost a year ago.

@pannal
Copy link
Owner

pannal commented Apr 16, 2021

You're right, I could release the current changes. Will do, soon!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants