Open krystiancharubin opened 2 years ago
Hi @krystiancharubin, thank you for opening an issue !
What notification would you expect if two episodes do not have the same starting language ? What if the target language is not available ? Something like this is conceivable but could be way too long for some shows:
Better Call Saul
S01E01
- Audio: English -> French
- Subtitles: French -> French [Forced]
S01E02
- Audio: Spanish -> French
- Subtitles: None -> None
...
Or maybe having one notification per episode ?
You bring up a good point, maybe notification can say something like attempting to change language/subtitle to X. One per episode is probably a bit much especially if you are setting it for the entire show. Main reason for opening this issue was to differentiate language and subtitle changes.
I like your idea of notifying the attempt. It could maybe be something like this:
Squid Game: successfully set audio to Korean (Subtitles: English) for 6 episodes.
Squid Game: successfully set audio to Korean (Subtitles: English) for 4 episodes. 2 episodes were not updated due to mismatching tracks.
What do you think ?
Maybe break up some of the info so it's easy to see at a glance.
Show: Squid Game
Audio: Korean (EAC3 5.1)
Subtitles: English (SRT)
Message: Updated 4/6
Reason: Mismatching Tracks
I've updated the notifications based on your feedback, there is an example in #16. I did not include the reason for non-updated episodes as it's always the same. Feel free to reopen the issue if you want any additional changes. Thank you for your suggestions :)
Can we update it to add user and change language/subtitle labels to be in english? Also noticed that English SDH displays as just English but English Forced displays properly.
You are right the user should be added too.
For the title of the stream there are three fields provided by Plex:
title
: the name of the stream set in the video file metadata, there is no guarantee that this title is correct, it may even have no value.displayTitle
: a string created by Plex based on the language, whether the stream is forced (subtitles only), and the codec. Examples: English Forced (SRT)
, English (EAC3 5.1)
.extendedDisplayTitle
: it seems to be the concatenation of the title
and the displayTitle
, the forced
attribute does not seem to be present though (unless specified in the title
obviously). Example: French [Forced] (French SRT)
.For now I use the displayTitle
field, it does contains most important information without being redundant. Would you prefer to have the extendedDisplayTitle
instead ? Or perhaps something else ?
The username has been added to the notification in version v1.0.9.
Here are a few different subtitle streams and corresponding values generated based on the following pattern
{title} {language} ({codec.upper()})
In most cases this seems to works fine, but there are instances where title contains the language and we get
Chinese (Simplified) Chinese (SRT)
Would be great if we could parse out Simplified
from title so it becomes Simplified Chinese (SRT)
<Stream id="3968792" streamType="3" codec="srt" index="4" bitrate="0" language="Chinese" languageTag="zh" languageCode="zho" requiredBandwidths="1,1,1,1,1,1,1,1" title="Chinese (Simplified)" displayTitle="Chinese (SRT)" extendedDisplayTitle="Chinese (Simplified) (Chinese SRT)"> </Stream>
<Stream id="3968793" streamType="3" codec="srt" index="5" bitrate="0" language="Chinese" languageTag="zh" languageCode="zho" requiredBandwidths="1,1,1,1,1,1,1,1" title="Chinese (Traditional)" displayTitle="Chinese (SRT)" extendedDisplayTitle="Chinese (Traditional) (Chinese SRT)"> </Stream>
<Stream id="3968798" streamType="3" codec="srt" index="10" bitrate="0" language="English" languageTag="en" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="English (SRT)" extendedDisplayTitle="English (SRT)"> </Stream>
<Stream id="3968799" streamType="3" codec="srt" index="11" bitrate="0" language="English" languageTag="en" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" title="SDH" displayTitle="English (SRT)" extendedDisplayTitle="SDH (English SRT)"> </Stream>
<Stream id="3968800" streamType="3" forced="1" codec="srt" index="12" bitrate="0" language="English" languageTag="en" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" title="Forced" displayTitle="English Forced (SRT)" extendedDisplayTitle="Forced (English SRT)"> </Stream>
<Stream id="3968801" streamType="3" codec="srt" index="13" bitrate="0" language="Spanish" languageTag="es" languageCode="spa" requiredBandwidths="1,1,1,1,1,1,1,1" title="Spanish (Latin America)" displayTitle="Spanish (SRT)" extendedDisplayTitle="Spanish (Latin America) (Spanish SRT)"> </Stream>
<Stream id="3968802" streamType="3" codec="srt" index="14" bitrate="0" language="Spanish" languageTag="es" languageCode="spa" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="Spanish (SRT)" extendedDisplayTitle="Spanish (SRT)"> </Stream>
<Stream id="3968805" streamType="3" codec="srt" index="17" bitrate="0" language="French" languageTag="fr" languageCode="fra" requiredBandwidths="1,1,1,1,1,1,1,1" title="French (Canada)" displayTitle="French (SRT)" extendedDisplayTitle="French (Canada) (French SRT)"> </Stream>
<Stream id="3968806" streamType="3" codec="srt" index="18" bitrate="0" language="French" languageTag="fr" languageCode="fra" requiredBandwidths="1,1,1,1,1,1,1,1" title="French (France)" displayTitle="French (SRT)" extendedDisplayTitle="French (France) (French SRT)"> </Stream>
<Stream id="3968819" streamType="3" codec="srt" index="31" bitrate="0" language="Portuguese" languageTag="pt" languageCode="por" requiredBandwidths="1,1,1,1,1,1,1,1" title="Portuguese (Brazil)" displayTitle="Portuguese (SRT)" extendedDisplayTitle="Portuguese (Brazil) (Portuguese SRT)"> </Stream>
<Stream id="3968820" streamType="3" codec="srt" index="32" bitrate="0" language="Portuguese" languageTag="pt" languageCode="por" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="Portuguese (SRT)" extendedDisplayTitle="Portuguese (SRT)"> </Stream>
<Stream id="3968830" streamType="3" codec="srt" index="42" bitrate="0" language="Chinese" languageTag="zh" languageCode="zho" requiredBandwidths="1,1,1,1,1,1,1,1" title="Cantonese" displayTitle="Chinese (SRT)" extendedDisplayTitle="Cantonese (Chinese SRT)"> </Stream>
<Stream id="3921657" streamType="3" forced="1" codec="srt" index="3" language="Korean" languageTag="ko" languageCode="kor" requiredBandwidths="1,1,1,1,1,1,1,1" title="Forced" displayTitle="Korean Forced (SRT)" extendedDisplayTitle="Forced (Korean SRT)"> </Stream>
<Stream id="3921658" streamType="3" codec="srt" index="4" bitrate="0" language="English" languageTag="en" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" title="Forced" displayTitle="English (SRT)" extendedDisplayTitle="Forced (English SRT)"> </Stream>
<Stream id="3921659" streamType="3" codec="srt" index="5" bitrate="0" language="Korean" languageTag="ko" languageCode="kor" requiredBandwidths="1,1,1,1,1,1,1,1" title="SDH" displayTitle="Korean (SRT)" extendedDisplayTitle="SDH (Korean SRT)"> </Stream>
<Stream id="3921668" streamType="3" codec="srt" index="14" bitrate="0" language="Spanish" languageTag="es" languageCode="spa" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="Spanish (SRT)" extendedDisplayTitle="Spanish (SRT)"> </Stream>
<Stream id="3921669" streamType="3" codec="srt" index="15" bitrate="0" language="Spanish" languageTag="es" languageCode="spa" requiredBandwidths="1,1,1,1,1,1,1,1" title="European" displayTitle="Spanish (SRT)" extendedDisplayTitle="European (Spanish SRT)"> </Stream>
<Stream id="3921682" streamType="3" codec="srt" index="28" bitrate="0" language="Portuguese" languageTag="pt" languageCode="por" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="Portuguese (SRT)" extendedDisplayTitle="Portuguese (SRT)"> </Stream>
<Stream id="3921683" streamType="3" codec="srt" index="29" bitrate="0" language="Portuguese" languageTag="pt" languageCode="por" requiredBandwidths="1,1,1,1,1,1,1,1" title="Brazilian" displayTitle="Portuguese (SRT)" extendedDisplayTitle="Brazilian (Portuguese SRT)"> </Stream>
<Stream id="3921691" streamType="3" codec="srt" index="37" bitrate="0" language="Chinese" languageTag="zh" languageCode="zho" requiredBandwidths="1,1,1,1,1,1,1,1" title="Simplified" displayTitle="Chinese (SRT)" extendedDisplayTitle="Simplified (Chinese SRT)"> </Stream>
<Stream id="3921692" streamType="3" codec="srt" index="38" bitrate="0" language="Chinese" languageTag="zh" languageCode="zho" requiredBandwidths="1,1,1,1,1,1,1,1" title="Traditional" displayTitle="Chinese (SRT)" extendedDisplayTitle="Traditional (Chinese SRT)"> </Stream>
Chinese (Simplified) Chinese (SRT)
Chinese (Traditional) Chinese (SRT)
English (SRT)
SDH English (SRT)
Forced English (SRT)
Spanish (Latin America) Spanish (SRT)
Spanish (SRT)
French (Canada) French (SRT)
French (France) French (SRT)
Portuguese (Brazil) Portuguese (SRT)
Portuguese (SRT)
Cantonese Chinese (SRT)
Forced Korean (SRT)
Forced English (SRT)
SDH Korean (SRT)
Spanish (SRT)
European Spanish (SRT)
Portuguese (SRT)
Brazilian Portuguese (SRT)
Simplified Chinese (SRT)
Traditional Chinese (SRT)
Maybe we can also simplify
Updated episodes: 6/20 (S05E01 - S05E20)
to
Updated: S05E01 - S05E20 (6/20)
Can we update the notification to provide details of language/subtitle changes. Language: English -> Korean Subtitle: None -> English
https://github.com/RemiRigal/Plex-Auto-Languages/blob/ebd41ac06a68f5230b868828d87830894c41f590/main.py#L158