[RELEASE] Video language script for audio & subtitle streams
#1
Hi,

there is currently no other way to show the language of all audio & subtitle streams of a video file than adding the language(s) to the filename and display images with substring conditions. Since XBMC already extracts all those infos (we just don't have the necessary info labels), I decided to make a small script which sets properties for the languages in the video info dialog.

You have to add this to DialogVideoInfo.xml
<onload condition="System.HasAddon(script.videolanguage) + [Container.Content(movies) | Container.Content(episodes)]">RunScript(script.videolanguage,movieid=$INFO[ListItem.DBID])</onload>


Then you can access the following properties in the video info dialog
PHP Code:
Window.Property(AudioLanguage.%d)
Window.Property(SubtitleLanguage.%d

Quick example
PHP Code:
<control type="grouplist">
    [...]
    <
control type="image">
        <
width>48</width>
        <
height>48</height>
        <
texture>$INFO[Window.Property(AudioLanguage.1),flags/language/,.png]</texture>
        <
visible>!IsEmpty(Window.Property(AudioLanguage.1))</visible>
    </
control>
    <
control type="image">
        <
width>48</width>
        <
height>48</height>
        <
texture>$INFO[Window.Property(AudioLanguage.2),flags/language/,.png]</texture>
        <
visible>!IsEmpty(Window.Property(AudioLanguage.2))</visible>
    </
control>
    [...]
</
control

I did some quick testing and it seems to work fine but you never know. Suggestions are welcome. Smile

GitHub
Image
Reply
 
Thread Rating:
  • 3 Vote(s) - 5 Average


Messages In This Thread
[RELEASE] Video language script for audio & subtitle streams - by `Black - 2013-02-10, 21:33


Logout Mark Read Team Forum Stats Members Help
[RELEASE] Video language script for audio & subtitle streams53