2013-02-10, 21:33
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
Quick example
I did some quick testing and it seems to work fine but you never know. Suggestions are welcome.
GitHub
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.
GitHub