Is it possible to create a script to open a playlist
#1
Hi,

I was wondering if it would be possible to create a script to open a playlist - basically the reason i am wanting to do this is i have added quite a few playlists to my setup (i am using SI02) as i like the simple interface (easy for wife and kids) - however i have used up all the "favourites" and was now hoping to trick the system in to allow me to add more of my favourite by using a script to open the playlist (rather then use the favourite function) - i started looking into writing my own script to do this - however to tell you the truth i was hoping someone had already found a solution and was willing to share - or even help with the script.

Thanks
Regards
jd
XBMC:
XBMC Frodo running on raspbmc (SI02)
XBMC Frodo running on openELEC (SI02)

Server:
Ubuntu 12.04

Image
Reply
#2
You would need a script for each new playlist. It may be easier to just edit the CustomHomeCustomizer.xml file found in addons/skin.sio2/1080i/ and replace the Addon or Script entries with more HomeFav ones.

For example, in line 307 there is this code for the first AddonCustom.

Code:
<item id="401" description="AddonCustom">
              <visible>!IsEmpty(Skin.String(HomeAddon.1.Label))</visible>
              <thumb>$INFO[Skin.String(HomeAddon.1.Icon)]</thumb>
              <label2>$INFO[system.addonicon(Skin.String(HomeAddon.1.Label))]</label2>
              <label>$INFO[system.addonTitle(Skin.String(HomeAddon.1.Label))]</label>
              <onclick>SetFocus(9000)</onclick>
            </item>
            <item id="401" description="AddonCustom">
              <visible>IsEmpty(Skin.String(HomeAddon.1.Label))</visible>
              <thumb>DefaultAddon.png</thumb>
              <label>+ $LOCALIZE[24000]</label>
              <onclick>Skin.SetAddon(HomeAddon.1.Label,xbmc.python.pluginsource)</onclick>
              <onclick>Skin.Reset(HomeAddon.1.Icon)</onclick>
            </item>

I took the line for item 606 HomeFav (just above it) and used them to overwrite the AddonCustom:
Code:
<item id="401" description="HomeFav">
              <visible>!IsEmpty(Skin.String(HomeFav.7.Label))</visible>
              <label>$INFO[Skin.String(HomeFav.7.Label)]</label>
              <label2>+ $LOCALIZE[1036]</label2>
              <thumb>$INFO[Skin.String(HomeFav.7.Icon)]</thumb>
              <onclick>SetFocus(9000)</onclick>
            </item>
            <item id="401" description="HomeFav">
              <visible>IsEmpty(Skin.String(HomeFav.7.Label))</visible>
              <thumb>DefaultAddon.png</thumb>
              <label>+ $LOCALIZE[1036]</label>
              <onclick>RunScript(script.favourites,property=HomeFav.7)</onclick>
            </item>

So I now have 7 slots for Favourites.

To make sure they show up on the Home screen, you need to edit the Home.xml.

Change the original item id=401 (around line 290) from this:
Code:
<item id="401" description="Custom addon">
          <visible>!IsEmpty(Skin.String(HomeAddon.1.Label))</visible>
          <thumb>$INFO[Skin.String(HomeAddon.1.Icon)]</thumb>
          <label2>$INFO[system.addonicon(Skin.String(HomeAddon.1.label))]</label2>
          <label>$INFO[system.addonTitle(Skin.String(HomeAddon.1.Label))]</label>
          <property name="color">icons/lightblue.png</property>
          <onclick>RunAddon($INFO[Skin.String(HomeAddon.1.Label)])</onclick>
        </item>

To this:
Code:
<item id="401" description="Custom Fvourite">
          <visible>!IsEmpty(Skin.String(HomeFav.7.Label))</visible>
          <thumb>$INFO[Skin.String(HomeFav.7.Icon)]</thumb>
          <label>$INFO[Skin.String(HomeFav.7.Label)]</label>
          <property name="color">icons/darkblue.png</property>
          <onclick>$INFO[Skin.String(HomeFav.7.Path)]</onclick>
        </item>
Reply

Logout Mark Read Team Forum Stats Members Help
Is it possible to create a script to open a playlist0