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
Tried ....pt.srt and ....por.srt
Still 'unknown' (while playback pressed a mapped button to change subtitles, notification shows unknown)

What else can I try?
Thanks
Please provide a debug log (wiki).
Going to travel now. Will send you on monday. Thanks for fast replies
amet, sorry about the delay.
Isn't possible to use a newer version of ISO 639 (ISO 639-1:2002) that has pt-br ?
pt-BR IETF RFC 1766 ISO 639-1:2002 PORTUGUESE (BRAZIL) PTB

XBMC has pt-br interface language but dont support pt-br subtitles.

Can you consider using this newer ISO?
Thanks

UPDATE:
I think I found a bug with subtitles. Can you confirm so I can open a TRAC?

Its easy to reproduce:
- Play a video with English embedded subtitles (mkv) AND an external subtitle (srt)
- Videoplayer (omxplayer / Raspberry Pi) starts playing the video using external subtitles
- I mapped <blue>ShowSubtitles</blue> in remote.xml
- When I press "blue" in the remote, it disabled subtitles and when I hit again, it shows the external subtitles (so far so good)
- If I go to the "Audio" menu (OSD), I can see that there's two subtitles. If I choose the second one (English 2/2) and go back to video, it shows ok the English subtitle
- When I press "blue" again it disables (ok) but don't show the external subtitles, only the English one. It cycles between No-subtitles and English subtitles

Shouldn't it cycle through Sub 1/2 (external), 2/2 (English) and Subs Disabled ?

Heres's a video showing this:
https://www.dropbox.com/s/lytd0o1wcngb1y....41.13.mp4

xbmc.log
https://www.dropbox.com/s/ouwdoxfsrdqjv97/xbmc.log

Also you can see in 00:13 the Subtitle menu "flying" in the screen. It's not near to the botton controls.

October-30 Nightly Build with Raspbmc
try newer build first, improved subtitles filtering was merged very recently (few days ago)
@ezechiel1917, thanks!

I just tested 12/Nov NB and it recognizes .pt-br.srt as "Portuguese - br (external)" and it cycles OK external/internal/no-subs
Also the audio menu is showing "Portuguese - br (external) 1/2" instead of the fullname of the srt file (old behavior) - its easier to see!

I noticed a nice subtitle icon in osd control "por" when pt-br subs are enabled and "eng" when English subs are enabled.
Nice feature!

I would like to suggest to use "PTB" (or PT-BR) for Portuguese (Brazilian) instead of "POR" - this one is only for Portuguese-PT from Portugal
Also to suggest changing string to "Portuguese - BR (external)" - upper string for "BR"

Can I propose this suggestion (GIT) or you can do it ?
Thanks so much!


PS:
Language Preference Manager is also "detecting" PT-BR ?

How XBMC is detecting PT-BR if there's nothing here about it ?
https://github.com/xbmc/xbmc/blob/master...pander.cpp (line 501)

Also in "const CharCodeConvertionWithHack CharCode2To3[184] =" (line 1193) there's two
{ "br", "bre", NULL }, - BRETON
{ "br", "bra" }, - BRAZIL

So the code will get only the first one, isn't ?
Brazil country code is { "br", "bra" },
https://en.wikipedia.org/wiki/ISO_3166-1
There's Brazil but there isnt Breton.

This ISOs are so confusing. They don't work together. At least for my language =)
These aren't iso codes, see http://en.wikipedia.org/wiki/IETF_language_tag. Are there any officially available mediums/files with pt-br language code?
I can't promise anything, but will think about a way to add it.
XBMC is now recognizing the PT-BR, for me its fine! My srt file has 'pt-br' on it. Will be a list to check the possible strings to use on .srt file ? For example pt-br, pt, por, pob, etc

I'm just wondering if it needs to be in LangCodeExpander.cpp too. I really don't know.

I would only suggest to change string "por" to "ptb" or "pt-br" in OSD/audio-menu and a comestic suggestion to upper 'br' string in "Portuguese - BR (external)" notification and audio menu.

Thanks for your fast reply.
From a few days I have a problem with this addon. Logs shows an exception which I'm adding here:
PHP Code:
00:58:56 T:2821634928  NOTICE: -->Python Interpreter Initialized<--
00:58:56 T:2873301872   ERROREXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - 
NOTEIGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            
Error Type: <type 'exceptions.AttributeError'>
                                            
Error Contents'module' object has no attribute 'scriptID'
                                            
Traceback (most recent call last):
                                              
File "/home/marx/.xbmc/addons/service.LanguagePreferenceManager-master/default.py"line 22in <module>
                                                
from settings import settings
                                              File 
"/home/marx/.xbmc/addons/script.module.sd-xbmc/lib/settings.py"line 5in <module>
                                                
import pLog
                                              File 
"/home/marx/.xbmc/addons/script.module.sd-xbmc/lib/pLog.py"line 4in <module>
                                                
scriptID sys.modules"__main__" ].scriptID
                                            AttributeError
'module' object has no attribute 'scriptID'
                                            
-->End of Python script error report<--
00:58:56 T:2821634928  NOTICEUniversal An Addons Toolkit: -watchhistory- -Loading sqlite3 as DB engine version3.7.13 

Of course addon doesn't work Sad
Any help?
Am I only one having problem?

Edit: sorry I didn't want to force you to fix problem, I would like to only know if problem is with plugin, or if I should try to check another parts of XBMC.
Please give me some time, bumping the thread on the same day as your first post is impolite imo.
I had two folders with this addon:
service.LanguagePreferenceManager
service.LanguagePreferenceManager-master
I've replaced service.LanguagePreferenceManager with what's in your attached zip - now error has happened in the second folder. So I deleted it and now no error and it seems it works ok. So there is some problem with directory naming.
hello all ,

can someone please tell me what i can do with add-on ? and how to use ? , i would like to get german subtitles / german dubbing

thank you in advance
ace20022, I know its not a 100% matter of Language Preference Manager but here are my doubts:

Using confluence
In Settings - Appearance - International
Theres's 'Portuguese (Brazil)' - "Language"
https://www.dropbox.com/s/kim21qe2lhtzr3...hot001.png

There's NOT 'Portuguese (Brazil)' in "Preferred subtitle language" (I didn't check "Prefered audio language". I think it don't have either)
https://www.dropbox.com/s/0o4p0k1ybphd4d...hot002.png

but there's an option called "User interface language"
https://www.dropbox.com/s/2bjaea4ygcujql...hot003.png


In "Settings - Video - Subtitles"
Theres's 'Portuguese (Brazil)' - "Languages to download subtitles for"
https://www.dropbox.com/s/klz8r68si9raex...hot004.png

As there's two settings to choose subtitles, what's the correct one? The first one or the second ?
Does the setting "Preferred subtitle language - User interface language" uses PT-BR for real ? Are they compatible (gui language and subtitle language) ?
Shouldn't exist only one subtitle language settings?

Also how the setting "Preferred subtitle language" and "Preferred Audio Language" works with " Language Preference Manage" add-on settings?
Which one are prioritized? Is there a conflict?

Sorry about all this questions. thanks in advance.
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