• 1
  • 24
  • 25
  • 26
  • 27
  • 28(current)
[Release] Language Preference Manager
As stated in my previous post, I modified your .py file to add both nob and nno. Merging no/nor and nb/nob will do just fine for most norwegians, as most of us consider bokmål to be the true norwegian language. To be honest, I don't really understand why there's two different ISO entries for norwegian and bokmål, as they're universally considered the same.
If you include new norwegian (nn/nno), it needs to be its own thing as it is a different language.
I make set posters! (I also take requests)
Reply
(2024-09-21, 18:43)Dragen Wrote: As stated in my previous post, I modified your .py file to add both nob and nno. Merging no/nor and nb/nob will do just fine for most norwegians, as most of us consider bokmål to be the true norwegian language. To be honest, I don't really understand why there's two different ISO entries for norwegian and bokmål, as they're universally considered the same.
If you include new norwegian (nn/nno), it needs to be its own thing as it is a different language.

Sorry I missed your modified langcodes.py proposal while writing my first answer. Thanks for the enlightment anyway  Wink
Creating new lines in this table require a bit more work, as you need to manage script/id renumbering in the table and update strings.po for the labels accordingly. Feasible if really needed.

But as you agree with this, I will add "nob" as alias to "nor" on the current Nowegian line, in next 1.0.5 release.
Reply
@Dragen
In the end I chose to stick to how ISO639-2 languages codes are declared and created new separated lines for both Norwegian Bokmal and New Norwegian.
Please check this release from Github LPM 1.0.5, and tell me if everything is fine.
I'll then push it to the official Kodi repository.
Reply
Hey, first of all thank you for this amazing addon.
I have a suggestion / feature request. I am not sure if this has been discussed before. If it has been discussed, I'd be happy to be filled in on the details. As a developer myself I was already looking into implementing it before finding this addon.
My idea is the following:

Add an option that stores the preference on a per show/movie basis. That means if I manually override the selected audio/subtitle it will do the following:
Extract a unique identifier for the show/movie and extract the language from the selected options. If no language was found: Store a pattern that plainly matches the index/name of the track (I have experienced media that has mislabeled tracks, which show up as "undefined" or similar)
Then store it as a seperate preference for the show/movie. That means if I pull up the next episode of the show it selects that audio/subtitle track instead of what my generic configuration says.
For example I usually prefer English over any other language. And I have specified that in the settings. But some things I'd like to watch in the OV language. Afaik there is no way to differentiate that right now if the languages between two media files overlaps (as in I want to watch one thing in Swedish and another in English, but both have an English track/subtitle).

Do you think that is possible?
I feel like the only thing missing from the code right now is: Detect when the user manually changes the player settings and then store preferences in a list/seperate file per media. Of course restoring the preferences is another part, but I feel like most of that is already handled by the current logic anyway.

EDIT:
Been working on it myself. Got it working with basic functionality. Need to remove some debug, detect subtitle changes seperately from audio changes and cleanup.
But audio selection tracking works.
https://github.com/SgtJalau/service.Lang...nceManager
Reply
@Jalau
first of all very sorry for such a late answer, I completely missed your post but I just saw yesterday your GITHUB change proposal !

Couple of questions coming to me when reading your initial post are like :
- how/where to store the overriding information per movie/show/episode that will be generated
- could we be using the existing "genre/tag" option in custom rules and reach part of the goal
- I believe that KODI itself is storing last audio/subtitle selection per movie/episode file in the VideoLibrary. Of course LPM does override it each time, that is its purpose. But maybe we could use that standard KODI mechanism in a way....

Anyway this is an interesting new feature indeed. I personnally stumbled on such cases some times, more when it comes to TV Shows than individual movies though.

Let us look deeper into you Github change and come back there.
Reply
Ich habe das Plugin in Kodi 21 eingebunden. Ich benutze es um immer auf "Deutsche" Untertitel voreinzustellen. Es funktioniert alles super, mit der Ausnahme wenn Dolby Vision 2 Layer Struktur in M2TS-Dateien vorhanden ist > Also die 2 Videostreams. Dann sieht man das er kurz für einige Sekunden auf Deutsch Untertitel wechelt, dann aber auf "deaktiviert" springt. Vielleicht bekommt ihr es ja noch mit einem Update hin?
Reply
I integrated the plugin into Kodi 21. I use it to always enable subtitles to "German". Everything works great, except when Dolby Vision 2 layer structure is present in M2TS files > the 2 video streams are included in 2MTS. Then you can see that it briefly switches to German subtitles for a few seconds, but then switches to "deactivated". Maybe you can fix it with an update?
Reply
I recently came across this addon which seemed like it could solve my 1st world problem but it didn't or maybe I'm not setting it up right? Here's the story, I'll try to keep it brief:
I have a bit over 100 movies and around 150 episodes in my collection, I normally delete the stuff I watched, so it's all pretty much for a one-time use.

I mostly need/use external subtitle (srt) in my native tongue, and when those are not available I use English subs. Those external subtitles are named exactly like the file name, I never changed/added the 3-letter language info to the file name since Kodi picks them by default and displays them correctly and also because I have another app that access those media files. So since those media files are basically for single-time use and I can't bulk-rename them (because of that other app) it doesn't make sense to manually add that 3-letter language info (or re-encode the mkv files to include the subs in them.
The thing I was hoping this addon would/could do for me is to automatically use English subs when there are no external subs available in my native tongue. This is something Kodi doesn't do by default.
But because of the file names, which in Kodi they're displayed as language Unknown (since Kodi's UI is also translated to my native tongue I'm translating back to English here and I hope it's both clear and not too far-off what it actually displays).
If I use my native tongue as the highest priority language with English as lower priority it only shows English subs b/c the language of those external subs is unknown.

Is there any way to accomplish what I want with the addon as it is or maybe you'd consider adding support for language Unknown (Either by allowing to pick it as a language or possibly adding an option to treat all unknown language as a certain language)?

I hope this all makes sense.
Reply
(2025-01-24, 23:29)Guybrush65 Wrote: I integrated the plugin into Kodi 21. I use it to always enable subtitles to "German". Everything works great, except when Dolby Vision 2 layer structure is present in M2TS files > the 2 video streams are included in 2MTS. Then you can see that it briefly switches to German subtitles for a few seconds, but then switches to "deactivated". Maybe you can fix it with an update?

Hello and welcome !
I personnaly have not experienced DV2/M2TS files yet, so to help with debugging, can you please reproduce the issue with Debug turned ON (both in addon + kodi itself) and post a link to your resulting log via
https://paste.kodi.tv/

Also a mediainfo output of the file can help !
Reply
Code from kodi-log:
https://paste.kodi.tv/guhuhamape.kodi

Code from languagepreferencer (I don't know if this is the right log file)
https://paste.kodi.tv/osenakaluy

Code from mediainfo (2 video layers for Dolby Vision):
https://paste.kodi.tv/loluwakaxa
Reply
Hello.  I recently discovered this addon, and I'm kicking myself I wasn't aware of it before. It's so nice to be able to watch content in various languages without even having to think about navigating subtitle menus. All thanks to the authors.

I do have one thing I wish LPM would allow me to do and it's this:  Once I start watching something, if I bring up the file's subtitle menu and make a choice other than the one the Conditional feature had made for me for that particular file -- including the choice to turn off all subtitles -- then I would like it if my choice would be remembered and respected when I play that file again.  As it is now, the Conditional feature always overrides whatever choice I might have made the previous time I launched that file.

I think perhaps a flag could be added to the Conditional feature so that it would intervene: a) Every time a file is played or b) Only the first time a file is played.  (Note that I would want choice (b) NOT to depend on having a set resume point.  The default subtitling behavior -- i.e. without LPM -- does remember the subtitle setting of a file that's been played at least once, even if the file wasn't played long enough to set a resume point.)

I hope what I'm asking for makes sense.  I'd be happy to explain further if it doesn't.  Of course, if there's already a way to get the behavior I want, I'd be grateful if someone could tell me how.

Thanks in advance.
Reply
  • 1
  • 24
  • 25
  • 26
  • 27
  • 28(current)

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