[MOD] Movie Language Flag
#1
Thumbs Up 
Hey guys

As I have lots of movies with different (default) languages (mainly german but lots of english movies and some very exotic ones (e.g. japanese or russian as main language) I often want to know what language the movie is without having to start it and skip through it. As MKV allows to define the language of an audio stream and XBMC can read that information I made a mod which adds a "Language flag" to the flags in movies and tv shows library view.

This is what it normally looks like (Rating is missing in this one as well):
Image

And this is how it looks like with the language flag:
Image

Of course there is an option in the alaska settings to turn the flag on/off:
Image

And here are two more screenshots with other languages (german and japanese):
Image Image

This is what I changed in the XML files:

720p/CustomSettings.xml
Look for
Code:
<control type="radiobutton" id="308">
which contains the setting for the year flag.

Now add these lines right before the line posted above:
Code:
                    <control type="radiobutton" id="309">
                        <width>740</width>
                        <font>Font_Settings</font>
                        <textcolor>Text</textcolor>
                        <focusedcolor>TextFocused</focusedcolor>
                        <!-- LOC -->
                        <label>Show Language Flags</label>
                        <align>left</align>
                        <aligny>center</aligny>
                        <onclick>Skin.ToggleSetting(nolanguagepanel)</onclick>
                        <selected>!Skin.HasSetting(nolanguagepanel)</selected>
                    </control>

720p/Includes_MediaFlags.xml
Replace the original file with the one you can download here http://rapidshare.com/files/316755604/In...s.xml.html and here http://www.sendspace.com/file/9oaimq (RapidShare seems to be very slow for me right now).
I had to do it this way as the changed code is about 11k characters and this board limits a post to 10k characters.

I hope it works and you guys like it. If you find any bug, please let me know.
Maybe this can even make it into the official version (as I hate updating the files manually after every update to the skin Wink).

PS: @Hitcher: I think you forgot to adjust the <visible> condition on line 25 in the "Includes_MediaFlags.xml". There is no "subcondition" for the "Years flag" you recently added. I also added that "fix" in my mod.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#2
This looks nice, I'm going to try it out.

[EDIT] Just gave it a quick try & it fits in nicely with Alaska. I also would love this to be incorporated into the Official Alaska, if possible. Thanks Montellese.[url=http://forum.xbmc.org/member.php?action=profile&uid=42080][/url]
Reply
#3
As long as its an option in the skin settings sounds fine. I like Alaska because of its professional and uncluttered look and adding more flags starts to distract from that...
Reply
#4
uncertainty Wrote:As long as its an option in the skin settings sounds fine. I like Alaska because of its professional and uncluttered look and adding more flags starts to distract from that...

Yeah that's right. I have the ratings flag disabled so there is enough room for the language flag bit if you really display all of them it starts looking a bit "crowded". But as all of the flags are optional everyone can display only those flags he wants to see.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
Great addition!!
Reply
#6
I'm going to have to rework the Now Playing area before I can add this officially otherwise there's going to be overlapping issues.
Reply
#7
nice but that's getting a bit too cluttered IMO. less is better.
Reply
#8
about "Has Subtitle" is it possible to add?
Reply
#9
Hitcher Wrote:I'm going to have to rework the Now Playing area before I can add this officially otherwise there's going to be overlapping issues.

Nooooo!!!!! lol
Reply
#10
Image

Image

Image

Image

That's definitely it, no more flags.

I'm using one label to shows all the Now Playing elements, with line breaks to split them up, and <wrapmultiline> to break up long names. As soon as it's been added I'll align everything up with the bottom of the thumb until then it's centralised.
Reply
#11
@Hitcher: Oh yeah you are right. I didn't notice it because I only tried it with a "standard length" title like "2 Fast 2 Furious". But if I try it with "The Assassination of Jesse James by the Coward Robert Ford" and it looks aweful.

zeus[x];452559 Wrote:about "Has Subtitle" is it possible to add?

Yeah this should be possible exactly the same way as the Language flag. You just need to use the
Code:
ListItem.SubtitleLanguage
instead of the
Code:
ListItem.AudioLanguage
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#12
Hitcher Wrote:That's definitely it, no more flags.

I'm using one label to shows all the Now Playing elements, with line breaks to split them up, and <wrapmultiline> to break up long names. As soon as it's been added I'll align everything up with the bottom of the thumb until then it's centralised.

This looks even better. Nice idea inverting the colors of the text and the background. Now that the language flag has been officially added to a skin I use it's time to re-encode all the movies that don't have the language information included.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#13
damn, these are nice additions, guys!
I have a lot of my dvds stored as dual-language avis or mkvs... how would these show up? (cannot test on the real machine till saturday)
Reply
#14
I don't really know about AVIs. Until a few days ago I was quite sure that the AVI container doesn't allow to store meta data into it but a friend of mine directed me to a tool which does exactly that.
As I only have MKVs I know that it works for them. Of course only if there is proper meta data applied to the audio sources. You can use mkvmerge to see if your MKVs have the data in it.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#15
A flag for subtitles would be great, I have to check this all the time Smile

But, can it both detect a .srt, .sub etc. in the same folder as the movie file and inbuilt subtitles in a .mkv for example?
Reply

Logout Mark Read Team Forum Stats Members Help
[MOD] Movie Language Flag0