Kodi Community Forum

Full Version: [Release] Language Preference Manager
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
@LeVvE

Nothing wrong with the video file,.
But from the debug log, the languageprefencemanager service is installed and has the right version 1.0.1
but for a reason the service is not started/never activated  at all...
It is just like it never kicks in  Confused  

Can you send me a link to a copy of your settings.xml file, or if you prefer screenshots of the 4 tabs : general, audio, subtitles and conditional tabs could do.
(2023-06-17, 08:30)rockrider69 Wrote: [ -> ]@LeVvE

Nothing wrong with the video file,.
But from the debug log, the languageprefencemanager service is installed and has the right version 1.0.1
but for a reason the service is not started/never activated  at all...
It is just like it never kicks in  Confused  

Can you send me a link to a copy of your settings.xml file, or if you prefer screenshots of the 4 tabs : general, audio, subtitles and conditional tabs could do.

Sure, I can take a few screenshots.

1. https://i.imgur.com/0aQsnF5.jpg
2. https://i.imgur.com/2lW2rvK.jpg
3. https://i.imgur.com/q5ibzPh.jpg
4. https://i.imgur.com/hJNacHO.jpg
(2023-06-17, 13:28)LeVvE Wrote: [ -> ].....
Sure, I can take a few screenshots.

1. https://i.imgur.com/0aQsnF5.jpg
2. https://i.imgur.com/2lW2rvK.jpg
3. https://i.imgur.com/q5ibzPh.jpg
4. https://i.imgur.com/hJNacHO.jpg

Settings look correct as well.

Could you turn on LPM DEBUG mode (General tab, 2nd line) and post a new kodi.log link ? This should give me some more insights.

Or even better you can turn on KODI DEBUG mode on top of it and I will get full details for analysis.
(2023-06-17, 18:30)rockrider69 Wrote: [ -> ]
(2023-06-17, 13:28)LeVvE Wrote: [ -> ].....
Sure, I can take a few screenshots.

1. https://i.imgur.com/0aQsnF5.jpg
2. https://i.imgur.com/2lW2rvK.jpg
3. https://i.imgur.com/q5ibzPh.jpg
4. https://i.imgur.com/hJNacHO.jpg

Settings look correct as well.

Could you turn on LPM DEBUG mode (General tab, 2nd line) and post a new kodi.log link ? This should give me some more insights.

Or even better you can turn on KODI DEBUG mode on top of it and I will get full details for analysis.
Here: https://paste.kodi.tv/nivasirili.kodi

Here is another log I did where I changed the audio from english to japanese and it goes from having no subtitle enabled to loading the forced one when it shouldn't: https://paste.kodi.tv/ivukulehew.kodi

Debug enabled in both Kodi and LPM.
(2023-06-17, 18:41)LeVvE Wrote: [ -> ]....
Debug enabled in both Kodi and LPM.

Thanks a lot for the logs ! I think I understand what is happening.

The forced track is properly tagged in the mkv file, but LPM in that case prefer to explore the title field of the sub (or name) looking for the "forced" keyword (most often these are set with a text like "English (forced)").
I am guessing that the main reason was probably to be a bit more independant vs containers or poor tagging...

In your mkv file both titles of sub tracks are empty, hence the mismatch.

I will work on a fix to LPM to check also the mkv forced tag in addition to the title field.

As a workaround, and if you have time for that, you could use mkvtoolnix/mkvmerge to update your mkv file, just adding a title "English (forced)" to your forced track.
Also to confirm my findings here.

Thanks again for reporting that !
(2023-06-17, 22:55)rockrider69 Wrote: [ -> ]
(2023-06-17, 18:41)LeVvE Wrote: [ -> ]....
Debug enabled in both Kodi and LPM.

Thanks a lot for the logs ! I think I understand what is happening.

The forced track is properly tagged in the mkv file, but LPM in that case prefer to explore the title field of the sub (or name) looking for the "forced" keyword (most often these are set with a text like "English (forced)").
I am guessing that the main reason was probably to be a bit more independant vs containers or poor tagging...

In your mkv file both titles of sub tracks are empty, hence the mismatch.

I will work on a fix to LPM to check also the mkv forced tag in addition to the title field.

As a workaround, and if you have time for that, you could use mkvtoolnix/mkvmerge to update your mkv file, just adding a title "English (forced)" to your forced track.
Also to confirm my findings here.

Thanks again for reporting that !

Ah, I actually remove the name of the subtitles on purpose because it looks cleaner. I'll probably enable subtitles manually for now instead I have way too many files to redo everything Tongue

I will try to edit a file with the names of the sub files intact and see if it works with that.

EDIT: When I added full/forced to the names on one of the files it worked perfectly.
(2023-06-17, 22:59)LeVvE Wrote: [ -> ]....

I will try to edit a file with the names of the sub files intact and see if it works with that.

EDIT: When I added full/forced to the names on one of the files it worked perfectly.

Great that you could confirm!
I will still investigate if I can add the test against the forced mkv tag in addition to the track name, it makes sense anyway. On my todo list.
I'm confused with how to set this up.
Outcome I want is.
1. If audio isn't English enable the default subtitle track.
2. If audio is English display the forced subtitle track.
3. If audio is English and there's no forced subtitle track do not display any subtitles.

How do configure the plugin for that?
I'm confused with how to set this up.
Outcome I want is.
1. If audio isn't English enable the default subtitle track.
2. If audio is English display the forced subtitle track.
3. If audio is English and there's no forced subtitle track do not display any subtitles.

How do configure the plugin for that?

EDIT: This seems to do the above: eng:non>any:eng>any:eng
(2023-07-12, 11:01)mazerti Wrote: [ -> ]I'm confused with how to set this up.
Outcome I want is.
1. If audio isn't English enable the default subtitle track.
2. If audio is English display the forced subtitle track.
3. If audio is English and there's no forced subtitle track do not display any subtitles.

How do configure the plugin for that?

EDIT: This seems to do the above: eng:non>any:eng>any:eng


Hello and sorry for a late and long answer  Wink

You are very close and this should overall work (although I don't see the need for the 3rd rule any:eng)

Some more explanation, hopefully not too confusing :

- LPM basically overrides what the default languages and/or subtitles are in the video file

- So normally you achieve your objectives 3 and 2 with one single rule in conditional subtitles menu "LANG eng then SUB non and FORCED tag on" or "eng:non" in conditional customized.

- Then a second rule like "LANG any then SUB eng and FORCED tag off" or "any:eng" will give you the english sub for any other language  (was is actually your objective 1?) even if english is not the default track in the mkv file (imagine the mkv file has German and not English as the default sub for example, then your objective is not really achieved...)

I believe that the default sub track is activated when none of the defined rules have been met .... (but I'd have to investigate a bit more to confirm 100%). Then if really you want German (or any other sub defined as default in your video file) just keeping the first rule above "LANG eng then SUB non and FORCED tag on", and nothing more, should do the trick.

Hope this helps!
I've ran into another issue, I don't know if it's addon related or just the way Kodi works, anyway.

When starting a video it takes 5-10 seconds for the subtitles to actually load, videos where there is audio at the start of the video will not have any subtitles so I have to rewind and watch it again after subtitles loaded.

If I disable the addon and make Kodi load my subtitles instead it will show the subtitles at the start without having to rewind.

I've tried setting the delay in the addon to 0 but it didn't help.
(2023-08-13, 18:22)LeVvE Wrote: [ -> ]..............
When starting a video it takes 5-10 seconds for the subtitles to actually load, videos where there is audio at the start of the video will not have any subtitles so I have to rewind and watch it again after subtitles loaded.
.......
You are right, and this is a known problem with the addon.
But I have not been able to fix it so far, I do not understand why the subtitle switch requested by the addon takes that long time, while the audio switch if ever requested also, is almost instant...

If anyone here has an idea Undecided
(2023-08-14, 19:38)rockrider69 Wrote: [ -> ]
(2023-08-13, 18:22)LeVvE Wrote: [ -> ]..............
When starting a video it takes 5-10 seconds for the subtitles to actually load, videos where there is audio at the start of the video will not have any subtitles so I have to rewind and watch it again after subtitles loaded.
.......
You are right, and this is a known problem with the addon.
But I have not been able to fix it so far, I do not understand why the subtitle switch requested by the addon takes that long time, while the audio switch if ever requested also, is almost instant...

If anyone here has an idea Undecided
See:

https://github.com/xbmc/xbmc/issues/21086
@crawfish

Many thanks to come back with this !
It explains a lot and might even give some idea for a workaround, like using seek(-1).
I'll give it a try at least  Wink
(2023-07-20, 01:06)rockrider69 Wrote: [ -> ]
(2023-07-12, 11:01)mazerti Wrote: [ -> ]I'm confused with how to set this up.
Outcome I want is.
1. If audio isn't English enable the default subtitle track.
2. If audio is English display the forced subtitle track.
3. If audio is English and there's no forced subtitle track do not display any subtitles.

How do configure the plugin for that?

EDIT: This seems to do the above: eng:non>any:eng>any:eng


Hello and sorry for a late and long answer  Wink

You are very close and this should overall work (although I don't see the need for the 3rd rule any:eng)

Some more explanation, hopefully not too confusing :

- LPM basically overrides what the default languages and/or subtitles are in the video file

- So normally you achieve your objectives 3 and 2 with one single rule in conditional subtitles menu "LANG eng then SUB non and FORCED tag on" or "eng:non" in conditional customized.

- Then a second rule like "LANG any then SUB eng and FORCED tag off" or "any:eng" will give you the english sub for any other language  (was is actually your objective 1?) even if english is not the default track in the mkv file (imagine the mkv file has German and not English as the default sub for example, then your objective is not really achieved...)

I believe that the default sub track is activated when none of the defined rules have been met .... (but I'd have to investigate a bit more to confirm 100%). Then if really you want German (or any other sub defined as default in your video file) just keeping the first rule above "LANG eng then SUB non and FORCED tag on", and nothing more, should do the trick.

Hope this helps!
I thought my way was working until it didn't on a certain film so I tried adding the 2 rules you mentioned and it now works perfect!
Thanks for the help Smile
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27