Kodi Community Forum

Full Version: Switch from 2 differents VideoOSD.xml
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello folks,

I use the osmc theme on osmc raspberry pi. I have created a modified VideoOSD.xml file and i would like to know if it is possible to switch from one to the other only at the begining of the video ?
I need to switch depending of video file playing. Actually i have duplicated osmc theme with a different VideoOSD.xml so i have to switch between theme before playing video. Is it possible ?


<include condition="VideoPlayer.Content(movies)">VideoOSD1</include>
<include condition="!VideoPlayer.Content(movies)">VideoOSD2</include>

and add your content to includes.xml


For reference

<include name="VideoOSD1">
<include name="VideoOSD2">

Other available bools:
List_of_boolean_conditions (wiki)

Or use any other compare/bool methods combined with available info labels
Many thanks, I'm not sure to know what condition i could use, is it possible to use playing file extension ?
As long as you won't tell us in which scenario which OSD should be displayed it's hard to answer

If i play an .mpd file i need to use videoosd1 else videoosd2
I should probably do something like :

<include condition="String.EndsWith(player.getPlayingFile(), 'mpd')">VideoOSD1</include>
<include condition="!String.EndsWith(player.getPlayingFile(), 'mpd')">VideoOSD1</include>

not working

<include condition="!String.EndsWith(VideoPlayer.Title, 'mpd')">VideoOSD1</include>
<include condition="String.EndsWith(VideoPlayer.Title, 'mpd')">VideoOSD2</include>
Well no, actually it doesn't work.

Here is what i tried : 

<include condition="!String.EndsWith(Player.Filename, 'mpd')">VideoOSD1</include>
<include condition="String.EndsWith(Player.Filename, 'mpd')">VideoOSD2</include>
You have to remove the '' for such conditions.
It's working fine, you have been very helpful