• 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 27
[Release] Language Preference Manager
(2021-02-23, 00:37)cyberden Wrote:
(2021-01-28, 11:57)snyft Wrote:
(2021-01-27, 02:34)scott967 Wrote: Thanks it should be fixed now.  Note that I also did a bump to matrix.3 so make sure you get the latest.

scott s.
.

Thanks, no error messages in Kodi now, I do have some mixed results though.
I set it up as follow:
Primary: Swedish
Secondary(Which I can't see it says in the configure UI) : English
I get the result that sometimes it does not choose Swedish any idea why this could be?
Sometimes it chooses English if there is Swedish and English other times it chooses nothing.

Some examples follow: Greyhound (no subtitle selected when Swedish and English present) and 10 Cloverfield Lane (English selected when Swedish available)
Debug: https://paste.kodi.tv/doyebewomu.kodi
Settings: https://paste.kodi.tv/fewanuqoqi
Hello. I used the work of Scott967 and merged it with my version of the addon to release an updated version that seems to work good (for me) on Kodi 19.

You can find it here

I don't have much time to work on this so don't expect regular updates or new features. If it works for me it will stay as is Smile
Thanks! Had to change kodis default subtitle language for it to work. Now it works as intended Smile
Reply
(2021-02-23, 00:37)cyberden Wrote:
(2021-01-28, 11:57)snyft Wrote:
(2021-01-27, 02:34)scott967 Wrote: Thanks it should be fixed now.  Note that I also did a bump to matrix.3 so make sure you get the latest.

scott s.
.

Thanks, no error messages in Kodi now, I do have some mixed results though.
I set it up as follow:
Primary: Swedish
Secondary(Which I can't see it says in the configure UI) : English
I get the result that sometimes it does not choose Swedish any idea why this could be?
Sometimes it chooses English if there is Swedish and English other times it chooses nothing.

Some examples follow: Greyhound (no subtitle selected when Swedish and English present) and 10 Cloverfield Lane (English selected when Swedish available)
Debug: https://paste.kodi.tv/doyebewomu.kodi
Settings: https://paste.kodi.tv/fewanuqoqi
Hello. I used the work of Scott967 and merged it with my version of the addon to release an updated version that seems to work good (for me) on Kodi 19.

You can find it here

I don't have much time to work on this so don't expect regular updates or new features. If it works for me it will stay as is Smile
Thanks for making it work on kodi 19.

Yesterday I have spent around 5 hours trying to understand why my language wouldn't work (Portuguese). Then I finally figured out the lang codes was a mess from number 13 onwards. So basically most of languages wasn't working. I fixed it, made a pull request in cyberden's GitHub. Anyone interested can download it directly HERE
Reply
(2021-04-08, 16:29)fpatrick Wrote:
(2021-02-23, 00:37)cyberden Wrote:
(2021-01-28, 11:57)snyft Wrote: Thanks, no error messages in Kodi now, I do have some mixed results though.
I set it up as follow:
Primary: Swedish
Secondary(Which I can't see it says in the configure UI) : English
I get the result that sometimes it does not choose Swedish any idea why this could be?
Sometimes it chooses English if there is Swedish and English other times it chooses nothing.

Some examples follow: Greyhound (no subtitle selected when Swedish and English present) and 10 Cloverfield Lane (English selected when Swedish available)
Debug: https://paste.kodi.tv/doyebewomu.kodi
Settings: https://paste.kodi.tv/fewanuqoqi
Hello. I used the work of Scott967 and merged it with my version of the addon to release an updated version that seems to work good (for me) on Kodi 19.

You can find it here

I don't have much time to work on this so don't expect regular updates or new features. If it works for me it will stay as is Smile
Thanks for making it work on kodi 19.

Yesterday I have spent around 5 hours trying to understand why my language wouldn't work (Portuguese). Then I finally figured out the lang codes was a mess from number 13 onwards. So basically most of languages wasn't working. I fixed it, made a pull request in cyberden's GitHub. Anyone interested can download it directly HERE
I don't know why but this gives me Thai subtitles when selecting Swedish subtitles as the primary subtitle language.
Reply
(2021-04-08, 16:29)fpatrick Wrote:
(2021-02-23, 00:37)cyberden Wrote:
(2021-01-28, 11:57)snyft Wrote: Thanks, no error messages in Kodi now, I do have some mixed results though.
I set it up as follow:
Primary: Swedish
Secondary(Which I can't see it says in the configure UI) : English
I get the result that sometimes it does not choose Swedish any idea why this could be?
Sometimes it chooses English if there is Swedish and English other times it chooses nothing.

Some examples follow: Greyhound (no subtitle selected when Swedish and English present) and 10 Cloverfield Lane (English selected when Swedish available)
Debug: https://paste.kodi.tv/doyebewomu.kodi
Settings: https://paste.kodi.tv/fewanuqoqi
Hello. I used the work of Scott967 and merged it with my version of the addon to release an updated version that seems to work good (for me) on Kodi 19.

You can find it here

I don't have much time to work on this so don't expect regular updates or new features. If it works for me it will stay as is Smile
Thanks for making it work on kodi 19.

Yesterday I have spent around 5 hours trying to understand why my language wouldn't work (Portuguese). Then I finally figured out the lang codes was a mess from number 13 onwards. So basically most of languages wasn't working. I fixed it, made a pull request in cyberden's GitHub. Anyone interested can download it directly HERE

I merged the PR. Didn't try the Thai/Swedish potential issue.
Reply
Yesterday I have spent around 5 hours trying to understand why my language wouldn't work (Portuguese). Then I finally figured out the lang codes was a mess from number 13 onwards. So basically most of languages wasn't working. I fixed it, made a pull request in cyberden's GitHub. Anyone interested can download it directly HERE
[/quote]
Reply
[/quote]
Thanks for making it work on kodi 19.

Yesterday I have spent around 5 hours trying to understand why my language wouldn't work (Portuguese). Then I finally figured out the lang codes was a mess from number 13 onwards. So basically most of languages wasn't working. I fixed it, made a pull request in cyberden's GitHub. Anyone interested can download it directly HERE
[/quote]

Hi bro, can you help me make a fix for vietnamese language subtitles Sad, i dont know how to do. Thank you
Reply
(2021-05-20, 21:00)linkinlt Wrote: Yesterday I have spent around 5 hours trying to understand why my language wouldn't work (Portuguese). Then I finally figured out the lang codes was a mess from number 13 onwards. So basically most of languages wasn't working. I fixed it, made a pull request in cyberden's GitHub. Anyone interested can download it directly HERE
[/quote]
Could you bro 😥😥😥
Reply
Have found this add-on and tested but unfortunately it doesn't seem to behave as expected.
Installed service.languagepreferencemanager-0.0.7+matrix.3.fixed.zip on Kodi 19.3 (Matrix)

I have a movie with the following streams:
Audio #1
Title                                    : lektor
Language                                 : Polish
Default                                  : Yes
Forced                                   : Yes
---------
Audio #2
Title                                    : dubbing
Language                                 : Polish
Default                                  : No
Forced                                   : No
---------
Audio #3
Language                                 : English
Default                                  : No
Forced                                   : No
---------
Text
Language                                 : Polish
Default                                  : No
Forced                                   : No



With the settings in the add-on:

"General" section:
Enable Language Preference Manager" is enabled.
Custom settings all are not enabled.

"Audio Preferences" section:
Enable Preference is not enabled.

"Subtitle Preferences" section:
Enable Preference is not enabled.

"Conditional Subtitle Preferences" section:
Enable Preference is enabled.
If audio language is Polish then display subtitle with language: None
If audio language is English then display subtitle with language: Polish
Forced is enabled for both above settings.

it simple doesn't work: when starting a movie Audio #1 is activated (that is OK - it has both flags Default and Forced set to 'Yes') but still subtitles are displayed while I'm expecting to see no subtitles because:
"If audio language is Polish then display subtitle with language: None"
Reply
Sad 
(2022-01-29, 00:52)rafikW Wrote: .....

it simple doesn't work: when starting a movie Audio #1 is activated (that is OK - it has both flags Default and Forced set to 'Yes') but still subtitles are displayed while I'm expecting to see no subtitles because:
"If audio language is Polish then display subtitle with language: None"
Hello,

I struggled as well with the same issue with conditionnal subtitles, plus the above ones with languages codes being messed up (for me it was french, clearly misaligned between string.po and langcodes.py tables.

I eventually built my own version starting from the one from fpatrick github (many thanks by the way!).

In mine I believe all languages should be fine including French or Swedish or Thai;

Plus I fixed also the bug mentionned here by rafikW, and at least for me it works as expected now (pb was a test in default.py line 268 : testing vs None instead of "non" string in the table).

I have no issue to share my version with anyone interested to check if is ok in more cases. Problem is that I am a bit old school developer, not used to github  Confused. At least in the zip I kept a copy of all original files I modified, so one can compare and find my small mods.

Question : how to share my version, should I send a link via PM ? 

and if it is really usefull for more people I could spend some time learning how to do it the proper git way or simply send my stuff to the original developer...
Reply
Thanks @rockrider69 for looking into that addon.

I'm glad to see you were able to reproduce the issue I have reported and have it sorted out. I'm willing to test it so please find a way how to make your modded addon available.

If you are not familiar with github I think an option for you would be to contact the last maintainer of this addon and ask him if he agree to publish your "fixes"
Of course the best option is that you continue with your own github's repository but this is up to you to consider this possibility.

One more thing... a technical one...
To the scenario I have reported: if there would be a second text stream, lets say:
Text#2
Language                                 : Polish
Default                                  : Yes
Forced                                   : Yes

Then of course subtitles in that stream have to be displayed despite of the settings in addon.
Reply
(2022-02-08, 12:22)rafikW Wrote: One more thing... a technical one...
To the scenario I have reported: if there would be a second text stream, lets say:
Text#2
Language                                 : Polish
Default                                  : Yes
Forced                                   : Yes

Then of course subtitles in that stream have to be displayed despite of the settings in addon.

I believe that is the way I use it as well, to get French forced subtitles turned on if they are present, and even if French:None is the primary condition.

I have started to look into Github but this might take some time for me to learn the minimum required to create a clean repo.

So let me send you a link via PM for a zip. You can give it a try in the mean time and send me feedback if hopefully it works for you as well ...
Reply
Hello again,

I have now uploaded a modded version directly on github HERE
I hope I did it the right way.

Based on the previous one from @fpatrick (thanks!), I tried to fix :
- a bit more languages order with full alignment between langcodes.py, English/string.po, settings.xml
- conditional subtitles like "LangXX:None" should now turn off subtitles as expected (except if forced ones)
- errors in kodi log when customaudio,sub,condsub are empty/not used

Feedback is welcome !
Reply
I will be able to test today late evening. And of course I will comment.
I'm really glad you are continuing development on this addon and I'm pretty sure it will be a success story in both: in addons functionalities and your journey with github :-)
Reply
Testing done with the following file with the following streams:
---------
Video
ID                                       : 1
Format                                   : HEVC
---------
Audio #1
ID                                       : 2
Language                                 : Polish
Default                                  : Yes
Forced                                   : Yes
---------
Audio #2
ID                                       : 3
Language                                 : English
Default                                  : No
Forced                                   : No
---------
Text #1
ID                                       : 4
Format                                   : UTF-8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : Polish
Default                                  : No
Forced                                   : No
---------
Text #2
ID                                       : 5
Format                                   : UTF-8
Codec ID/Info                            : UTF-8 Plain Text
Title                                    : forced
Language                                 : Polish
Default                                  : Yes
Forced                                   : Yes

Results:
Forced Audio #1 is selected as expected.
Text #1 is not displayed and this is as requested and expected - thanks.
Text #2 is not displayed and this is wrong - subtitles stream with the flag "Forced=Yes" should be displayed.

I have uninstalled previously installed original addon together with settings and then I have installed your version.
Configuration is the same as presented in my first post
Reply
(2022-02-09, 20:31)rafikW Wrote: Text #2 is not displayed and this is wrong - subtitles stream with the flag "Forced=Yes" should be displayed.

Thanks a lot for testing !

Looks like  I have to check again the forced subtitles case then...
Can you copy here the few lines from kodi.log at the time you launch the movie : the ones starting with "INFO <general>: [Language Preference Manager] ........."

Will also dig out my own test file to compare our cases...
Reply
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 27

Logout Mark Read Team Forum Stats Members Help
[Release] Language Preference Manager2