Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[service.languagepreferencemanager] 1.0.5 #2677

Open
wants to merge 1 commit into
base: nexus
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion service.languagepreferencemanager/addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<addon
id="service.languagepreferencemanager"
name="Language Preference Manager"
version="1.0.4"
version="1.0.5"
provider-name="ace20022/scott967/rockrider69"
>
<requires>
Expand All @@ -27,6 +27,8 @@
Fix Greek and Serbian language codes according to iso639-2/T. Fix some typos.
Fix multiple 3 digit codes per language (ex. German ger,deu). Now OK also for Conditional Subtitles preferences.
1.0.4 : Fix and simplify SignsSongs subtagging (was colliding with language codes subtagging ie. pt-br). Thanks to BrutuZ!
1.0.5 : Add Norwegian Bokmal (nb,nob), New Nowegian (nn,nno) and English Middle (enm) language codes according to ISO639-2.
Clean-up some info/log message.

</news>
<assets>
Expand Down
5 changes: 5 additions & 0 deletions service.languagepreferencemanager/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--- Version 1.0.5

- Add Norwegian Bokmal (nb,nob), New Nowegian (nn,nno) and English Middle (enm) language codes according to ISO639-2.
- Clean-up some info/log message.

--- Version 1.0.4

- Fix and simplify Signs & Songs subtagging (was colliding with language codes subtagging ie. pt-br). Thanks to BrutuZ!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,18 @@ msgctxt "#30245"
msgid "Vietnamese"
msgstr ""

msgctxt "#30248"
msgid "English Middle"
msgstr ""

msgctxt "#30249"
msgid "Norwegian Bokmal"
msgstr ""

msgctxt "#30250"
msgid "New Norwegian"
msgstr ""

msgctxt "#30200"
msgid "None"
msgstr ""
Expand Down
3 changes: 3 additions & 0 deletions service.languagepreferencemanager/resources/lib/langcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
("Turkish" , "30", "tr", "tur", "42", 30243 ),
("Ukrainian" , "46", "uk", "ukr", "43", 30244 ),
("Vietnamese" , "51", "vi", "vie", "44", 30245 ),
("English Middle" , "2", "", "enm", "47", 30248 ),
("Norwegian Bokmal" , "3", "nb", "nob", "48", 30249 ),
("New Norwegian" , "3", "nn", "nno", "49", 30250 ),
("None" , "-1", "", "non", "45", 30200 ),
("Any" , "-2", "", "any", "46", 30300 ) )

Expand Down
9 changes: 6 additions & 3 deletions service.languagepreferencemanager/resources/lib/prefutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def evalAudioPrefs(self, audio_prefs):
if g_t and (not (self.genres_and_tags & g_t)):
continue

log(LOG_INFO,'Audio: genre/tag preference {0} met with intersection {1}'.format(g_t, (self.genres_and_tags & g_t)))
if g_t:
log(LOG_INFO,'Audio: genre/tag preference {0} met with intersection {1}'.format(g_t, (self.genres_and_tags & g_t)))
for pref in preferences:
name, codes = pref
codes = codes.split(r',')
Expand Down Expand Up @@ -243,7 +244,8 @@ def evalSubPrefs(self, sub_prefs):
if g_t and (not (self.genres_and_tags & g_t)):
continue

log(LOG_INFO,'Subtitle: genre/tag preference {0} met with intersection {1}'.format(g_t, (self.genres_and_tags & g_t)))
if g_t:
log(LOG_INFO,'Subtitle: genre/tag preference {0} met with intersection {1}'.format(g_t, (self.genres_and_tags & g_t)))
for pref in preferences:
if len(pref) == 2:
name, codes = pref
Expand Down Expand Up @@ -296,7 +298,8 @@ def evalCondSubPrefs(self, condsub_prefs):
if g_t and (not (self.genres_and_tags & g_t)):
continue

log(LOG_INFO,'Cond Sub: genre/tag preference {0} met with intersection {1}'.format(g_t, (self.genres_and_tags & g_t)))
if g_t:
log(LOG_INFO,'Cond Sub: genre/tag preference {0} met with intersection {1}'.format(g_t, (self.genres_and_tags & g_t)))
for pref in preferences:
audio_name, audio_codes, sub_name, sub_codes, forced, ss_tag = pref
# manage multiple audio and/or subtitle 3-letters codes if present (ex. German = ger,deu)
Expand Down
36 changes: 36 additions & 0 deletions service.languagepreferencemanager/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
</options>
</constraints>
Expand Down Expand Up @@ -245,6 +248,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
</options>
</constraints>
Expand Down Expand Up @@ -301,6 +307,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
</options>
</constraints>
Expand Down Expand Up @@ -376,6 +385,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
</options>
</constraints>
Expand Down Expand Up @@ -436,6 +448,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
</options>
</constraints>
Expand Down Expand Up @@ -496,6 +511,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
</options>
</constraints>
Expand Down Expand Up @@ -575,6 +593,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
<option label="30300">46</option>
</options>
Expand Down Expand Up @@ -630,6 +651,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
</options>
</constraints>
Expand Down Expand Up @@ -690,6 +714,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
<option label="30300">46</option>
</options>
Expand Down Expand Up @@ -745,6 +772,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
</options>
</constraints>
Expand Down Expand Up @@ -805,6 +835,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
<option label="30300">46</option>
</options>
Expand Down Expand Up @@ -860,6 +893,9 @@
<option label="30243">42</option>
<option label="30244">43</option>
<option label="30245">44</option>
<option label="30248">47</option>
<option label="30249">48</option>
<option label="30250">49</option>
<option label="30200">45</option>
</options>
</constraints>
Expand Down
Loading