Change default selection to subtitle in video OSD
#1
Hey, I've been trying to figure out how to do this myself but the architecture of this skin is beyond me!
What do I change/add so that when I bring up the video OSD (enter) while viewing a video, I get the subtitle as the selected item, instead of the pause button?

thanks!
Reply
#2
You'd have to do some coding edits, but keep in mind these will be lost when the skin upgrades, so you'll to do them again. Here is the simplest way:

- First of all, start a movie in XBMC, press 'Enter', move to the side until you find the option "MENU IN WRAP LIST MODE". Press 'Enter' and it will be changed to "MENU IN FIXED LIST MODE".

- Close XBMC, and open this file: C:\Users\YOURUSERNAME\AppData\Roaming\XBMC\addons\skin.ace\720p\includes.xml

- Search for the following, around lines 2806-2827:
Code:
    <item id="16"><!-- info -->
    <label>-</label>
    <property name="condition">$INFO[skin.string(osd_video_info),disable)]</property>
    <icon>osd_menu_info.png</icon>
    <onclick condition="!Skin.HasSetting(customosd)">ActivateWindow(142)</onclick>
    <onclick condition="Skin.HasSetting(customosd) + !SubString(skin.string(osd_video_info),disable)">Skin.SetString(osd_video_info,disable)</onclick>
    <onclick condition="Skin.HasSetting(customosd) + SubString(skin.string(osd_video_info),disable)">Skin.Reset(osd_video_info,disable)</onclick>
    <visible>[!SubString(skin.string(osd_video_info),disable) | Skin.HasSetting(customosd)]</visible>
    </item>
    <item id="9"><!-- subtitle -->
    <label>-</label>
    <property name="condition">$INFO[skin.string(osd_video_subtitle),disable)]</property>
    <icon>osd_menu_sub.png</icon>
    <onclick condition="![Skin.HasSetting(customosd) | System.HasAddon(script.xbmc.subtitles)]">Notification($LOCALIZE[31435],XBMC Subtitles)</onclick>
    <onclick condition="![Skin.HasSetting(customosd) | System.HasAddon(script.xbmc.subtitles)]">ActivateWindow(Programs,Addons,return)</onclick>
    <onclick condition="!Skin.HasSetting(customosd) + System.HasAddon(script.xbmc.subtitles)">RunScript(script.xbmc.subtitles)</onclick>

    <onclick condition="!Skin.HasSetting(customosd) + System.HasAddon(script.xbmc.subtitles) + ![Player.Forwarding | Player.Rewinding] + [!IsEmpty(VideoPlayer.Title) | !IsEmpty(VideoPlayer.TVShowTitle)]">Skin.SetBool(novideofurnituretemp)</onclick>
    <onclick condition="Skin.HasSetting(customosd) + !SubString(skin.string(osd_video_subtitle),disable)">Skin.SetString(osd_video_subtitle,disable)</onclick>
    <onclick condition="Skin.HasSetting(customosd) + SubString(skin.string(osd_video_subtitle),disable)">Skin.Reset(osd_video_subtitle,disable)</onclick>
    <visible>[!SubString(skin.string(osd_video_subtitle),disable) | Skin.HasSetting(customosd)] + !VideoPlayer.Content(LiveTV)</visible>
    </item>

As you can see, these are the first two items in the fixed list menu, "Info" and "Subtitles". All you have to do is switch their order, so that "Subtitles" is first, like this:
Code:
    <item id="9"><!-- subtitle -->
    <label>-</label>
    <property name="condition">$INFO[skin.string(osd_video_subtitle),disable)]</property>
    <icon>osd_menu_sub.png</icon>
    <onclick condition="![Skin.HasSetting(customosd) | System.HasAddon(script.xbmc.subtitles)]">Notification($LOCALIZE[31435],XBMC Subtitles)</onclick>
    <onclick condition="![Skin.HasSetting(customosd) | System.HasAddon(script.xbmc.subtitles)]">ActivateWindow(Programs,Addons,return)</onclick>
    <onclick condition="!Skin.HasSetting(customosd) + System.HasAddon(script.xbmc.subtitles)">RunScript(script.xbmc.subtitles)</onclick>

    <onclick condition="!Skin.HasSetting(customosd) + System.HasAddon(script.xbmc.subtitles) + ![Player.Forwarding | Player.Rewinding] + [!IsEmpty(VideoPlayer.Title) | !IsEmpty(VideoPlayer.TVShowTitle)]">Skin.SetBool(novideofurnituretemp)</onclick>
    <onclick condition="Skin.HasSetting(customosd) + !SubString(skin.string(osd_video_subtitle),disable)">Skin.SetString(osd_video_subtitle,disable)</onclick>
    <onclick condition="Skin.HasSetting(customosd) + SubString(skin.string(osd_video_subtitle),disable)">Skin.Reset(osd_video_subtitle,disable)</onclick>
    <visible>[!SubString(skin.string(osd_video_subtitle),disable) | Skin.HasSetting(customosd)] + !VideoPlayer.Content(LiveTV)</visible>
    </item>
    <item id="16"><!-- info -->
    <label>-</label>
    <property name="condition">$INFO[skin.string(osd_video_info),disable)]</property>
    <icon>osd_menu_info.png</icon>
    <onclick condition="!Skin.HasSetting(customosd)">ActivateWindow(142)</onclick>
    <onclick condition="Skin.HasSetting(customosd) + !SubString(skin.string(osd_video_info),disable)">Skin.SetString(osd_video_info,disable)</onclick>
    <onclick condition="Skin.HasSetting(customosd) + SubString(skin.string(osd_video_info),disable)">Skin.Reset(osd_video_info,disable)</onclick>
    <visible>[!SubString(skin.string(osd_video_info),disable) | Skin.HasSetting(customosd)]</visible>
    </item>

- Save the file and exit.


There is also another way, by setting a custom keyboard shortcut. Create a text file (.txt), open it, place the following in it:
Code:
<keymap>
    <FullscreenVideo>
        <keyboard>
            <u>RunScript(script.xbmc.subtitles)</u>
        </keyboard>
    </FullscreenVideo>
</keymap>

... save it, rename it to "keymap.xml", and place it in the folder: C:\Users\YOURUSERNAME\AppData\Roaming\XBMC\userdata\keymaps
This way the subtitle addon will come up when you press 'u' on your keyboard. Obviously you can change this by editing "<u>" and "</u>" above (keep them lowercase), but remember that some of the keys are already mapped to specific XBMC actions.
Reply
#3
Thank you very much, the keyboard shortcut is a life savior, I didn't know one could run scripts directly in there!
This way I don't have to modify the skin and therefore like you said I won't lose the changes when it's updated (unless the author is willing to switch info with subtitles, or even better make it configurable like in aeon nox Wink )

Thanks again!
Reply

Logout Mark Read Team Forum Stats Members Help
Change default selection to subtitle in video OSD0