[MOD] Movie Language Flag

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Montellese Offline
Team-XBMC Developer
Posts: 3,756
Joined: Jan 2009
Reputation: 36
Location: Switzerland
Thumbs Up  [MOD] Movie Language Flag
Post: #1
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: alaskaorig.th.jpg]

And this is how it looks like with the language flag:
[Image: alaskalangmod.th.jpg]

Of course there is an option in the alaska settings to turn the flag on/off:
[Image: alaskalangsettings.th.jpg]

And here are two more screenshots with other languages (german and japanese):
[Image: alaskalangger.th.jpg] [Image: alaskalangjpn.th.jpg]

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 XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
Amra Offline
Cimmerian
Posts: 469
Joined: Jun 2009
Reputation: 12
Location: Aquilonia
Post: #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]
(This post was last modified: 2009-12-05 20:47 by Amra.)
find quote
uncertainty Offline
Fan
Posts: 499
Joined: Jun 2009
Reputation: 0
Location: Jersey
Post: #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...
find quote
Montellese Offline
Team-XBMC Developer
Posts: 3,756
Joined: Jan 2009
Reputation: 36
Location: Switzerland
Post: #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 XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
joebanana Offline
Member
Posts: 96
Joined: Nov 2009
Reputation: 0
Post: #5
Great addition!!
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,877
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #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.
find quote
turbinez Offline
Fan
Posts: 327
Joined: Sep 2008
Reputation: 0
Post: #7
nice but that's getting a bit too cluttered IMO. less is better.
find quote
zeus[x] Offline
Senior Member
Posts: 121
Joined: Sep 2009
Reputation: 0
Post: #8
about "Has Subtitle" is it possible to add?
find quote
hikaricore Offline
Posting Freak
Posts: 1,515
Joined: Dec 2008
Reputation: 0
Location: Tuesday
Post: #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
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,877
Joined: Aug 2007
Reputation: 101
Location: Eastleigh, UK
Post: #10
[Image: screenshot004z.jpg]

[Image: screenshot001pb.jpg]

[Image: screenshot003th.jpg]

[Image: screenshot002q.jpg]

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.
find quote
Montellese Offline
Team-XBMC Developer
Posts: 3,756
Joined: Jan 2009
Reputation: 36
Location: Switzerland
Post: #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 XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
Montellese Offline
Team-XBMC Developer
Posts: 3,756
Joined: Jan 2009
Reputation: 36
Location: Switzerland
Post: #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 XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
toneman77 Offline
Donor
Posts: 17
Joined: Sep 2009
Reputation: 0
Post: #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)
find quote
Montellese Offline
Team-XBMC Developer
Posts: 3,756
Joined: Jan 2009
Reputation: 36
Location: Switzerland
Post: #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 XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
Ayla Offline
Fan
Posts: 607
Joined: Feb 2008
Reputation: 0
Post: #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?
find quote
Post Reply