• 1
  • 12
  • 13
  • 14(current)
  • 15
  • 16
  • 29
[Release] Language Preference Manager
(2019-03-27, 13:43)Django.Durano Wrote:
(2019-03-26, 22:19)djoole Wrote: It the Json Player.GetProperties which is called, and currentsubtitle property which is retrieved and analysed. If I find the string forced in the currentsubtitle['name'], then I assume it's a forced subtitle.
So if your subtitles is something else than forced (ex : HI) it will be taken as a full subtitle. 

Is there any chance to get an option in the configuration where we can choose the name of the string? Instead of forced maybe full or something else.
What would you put in this option instead of "forced" if it would exist? "full" wouldn't catch every full subtitles. Most of the time full subs don't have "full" in the name.
But forced subs always have forced in the name Smile
Reply
(2019-03-27, 23:47)djoole Wrote: What would you put in this option instead of "forced" if it would exist? "full" wouldn't catch every full subtitles. Most of the time full subs don't have "full" in the name.
But forced subs always have forced in the name Smile 

I think I missunderstand something. You choose the subtitle by the name forced. Did you choose that from the name/title of the subtitle or from the flag Forced?
If it is chosen by name, it is not always the same but can sometimes be called a different name. If it is selected after the flags, then the subtitles should always include the forced flag.

Sorry it is a little bit tricky for me to explain this in english, I'm german. I hope you understand what I mean.


From MediaInfo.
The First is the Name of the Subtitle
the second are the Flags.
Image
Reply
The Kodi Json API only allows to retrieve currentsubtitle, which is an array containing :
integer index
string language
string name
I can't analyse forced/default flags because they are not retrieved.
So the addon is looking for "forced" in the language and/or name of the sub.
Reply
(2019-03-30, 13:54)djoole Wrote: The Kodi Json API only allows to retrieve currentsubtitle, which is an array containing :
integer index
string language
string name
I can't analyse forced/default flags because they are not retrieved.
So the addon is looking for "forced" in the language and/or name of the sub.
OK. I thought so already. Usually subtitles are also named forced for important subtitles and e.g. Full for complete subtitles.
It would be conceivable that this is not the case or someone has a different naming scheme, then the addon would not recognize this.
If there was a possibility in the addon menu where the user could decide for himself what the search term is, one would allow such different naming scheme.
To make it easier for beginners, you could possibly leave default forced as a search term, and who wants to change something else in the settings.

Unfortunately, I am not so fit in Python, but I think that would be realized?
Reply
Yes it could be done. I'll see what I can do as soon as I get time to look at it Smile
Reply
Thanks. That's awesome.
Reply
(2019-03-25, 23:45)djoole Wrote:
(2019-03-25, 07:38)i3laze Wrote: The add-on works as I need, but doesn’t fire, when audio is switched on the fly - only at playback start.. Sad
And I do switch language during playback on the mood. A callback is welcome.

Can you try and edit default.py, change line 67, replace 
Code:
def onAVStarted(self):
by 
Code:
def onAVChange(self):

Great, it did work! (a reboot was required)
As it’s not compatible with “Audio or Subtitle Preferences” enabled - language instantly bounces back to primary,
It does work great with just “Conditional Subtitles” I use: subs follow my manual audio choice.

I suggest this option to be introduced for Conditional and just Conditional code duplicated to onAVChange callback.

UPD: It also doesn’t work well with “Unpause jumpback add-on”: my externally downloaded subtitles on pause are being reset to embedded ones, but only if that add-on is enabled. Basic pause/rewind doesn’t trigger LPM.
Reply
So I installed this on kodi 18.1 and it seems to take around 10 seconds in for it to enable subtitles. Is there anyway I can set it to just always enable subtitles and only disable subtitles for things that are not Japanese? I tried to set a setting like this but it still seemed to take 10 seconds for the subtitles to show up.

Seeing subtitles for the first 10 seconds of something I don’t want to have subs is fine but the vice versa could mean that I miss 10 seconds of dialog =), thank you.
Reply
Just found this after getting annoyed for a long time having to enable my forced subs for anime. Thanks for updating it, @djoole.
Denon X6500H 7.2.4 -> LG OLED65C9P
Main:
NVIDIA Shield Pro (2019)
Other Devices: Apple TV 4K, FireStick 4K Max (2023), Homatics Box R 4K
Retired devices: Zidoo X9S, Xiaomi Mi Box, All the old RPi’s
Reply
Can someone assist on this. It is IMPOSSIBLE to get Greek subtitles played by default instead of the .en.srt (Kodi 18.3)
I have tried everything,
i install this add-on as someone suggested but again always the EN first.

Here are my files and screenshots.
From Kodi native, does not work

Image

The settings now with the add-one

Image

And i have almost all combinations on the folder:

Code:
Video Name.avi
Video Name.el.default.srt
Video Name.el.srt
Video Name.en.srt
Video Name.gr.default.srt

What am i doing wrong Huh?

Please help !!
Image
Reply
I would not have thought having two files named default or forced would work. How does Kodi know which one to choose? It is probably choosing the english one because "e" appears before "g"
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
(2019-08-26, 12:28)Karellen Wrote: I would not have thought having two files named default or forced would work. How does Kodi know which one to choose? It is probably choosing the english one because "e" appears before "g"

I just was trying to have all possible combinations. Nothing works. 
Tried video file.avi and
video file.gr.srt then .el.srt then .gr.default.srt then el.default.srt

Always i get the .en one

Image

Also the "e" before "g" is just bad coding if this is true but i do not believe it. Why the add-on doesn't honor the preference ? or kodi from the settings? i installed the add-on for that reason but something is going very bad with this.
Image
Reply
ok so it is true, the problem is because "e" is before "g" !!!!!!!!!!! that is some bad coding !!!!!

I changed the first language to Czech and create a script that will copy all .el.srt to .cs.srt  (it checks first if it exists) so this ways the .el.srt is there so it does not get downloaded again.

Now everythihg comes up with first subtitle Czech but with Greek inside..........!!!
Image
Reply
(2019-04-02, 08:49)djoole Wrote: Yes it could be done. I'll see what I can do as soon as I get time to look at it Smile
Great work on this!

Would be nice feature, when possible :

When watch the movie in preferred , e.g Hungarian language, with no subtitles (default), and  then choose another language, in kodi, 
e.g. English language, the addon would swith ON the preferred subtitles, automatically.
Reply
Is there any chance to get this beautiful addon working with matrix? (Kodi 19)
Reply
  • 1
  • 12
  • 13
  • 14(current)
  • 15
  • 16
  • 29

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