Kodi Community Forum
Change "Recent Albums" to "Random Albums" - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67)
+---- Forum: Confluence (https://forum.kodi.tv/forumdisplay.php?fid=125)
+---- Thread: Change "Recent Albums" to "Random Albums" (/showthread.php?tid=197979)



Change "Recent Albums" to "Random Albums" - VMCosco - 2014-06-16

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


RE: Change "Recent Albums" to "Random Albums" - VMCosco - 2014-06-17

Any thoughts on this inquiry?


RE: Change "Recent Albums" to "Random Albums" - Mudislander - 2014-06-18

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


RE: Change "Recent Albums" to "Random Albums" - VMCosco - 2014-06-18

(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.