Kodi Community Forum

Full Version: Change "Recent Albums" to "Random Albums"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hoping someone can help me with this...

I am changing the "Recently Added Albums" on the home screen to "Random Albums". I have already changed to the code in IncludesHomeRecentlyAdded so that it pulls random albums with following:

Code:
<item>
    <label>$INFO[Window.Property(RandomAlbum.1.Title)]</label>
    <label2>$INFO[Window.Property(RandomAlbum.1.Artist)]</label2>
    <onclick>PlayList.Clear</onclick>
    <onclick>PlayMedia("$INFO[Window.Property(RandomAlbum.1.Path)]")</onclick>
    <icon>-</icon>
    <thumb>$INFO[Window.Property(RandomAlbum.1.Thumb)]</thumb>
    <visible>!IsEmpty(Window.Property(RandomAlbum.1.Title))</visible>
</item>

I simply replaced "Latest" with "Random" in the original code. Everything works fine except that when I click an album, it will not play. Any ideas on how I have to change the code to make it work?

Thanks
Any thoughts on this inquiry?
You do realise that "Random" is not native to XBMC and that you're using window properties from SkinWidgets

Try using -

Code:
<onclick>PlayList.Clear</onclick>
<onclick>$INFO[Window(Home).Property(RandomAlbum.1.Play)]</onclick>

It always helps to see how other skins have done it Smile
(2014-06-18, 06:52)Mudislander Wrote: [ -> ]You do realise that "Random" is not native to XBMC and that you're using window properties from SkinWidgets

Try using -

Code:
<onclick>PlayList.Clear</onclick>
<onclick>$INFO[Window(Home).Property(RandomAlbum.1.Play)]</onclick>

It always helps to see how other skins have done it Smile

Worked like a charm. Much obliged.