Kodi Community Forum
Help with 'Smart Playlist' - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Help with 'Smart Playlist' (/showthread.php?tid=119634)



[SOLVED] Help with 'Smart Playlist' - Zeqad1ous - 2012-01-11

I am trying to write a smart playlist that will randomly play an episode of a given tv show.

Before its pointed out, yes I am aware I can choose all seasons and then shuffle to replicate this behavior. However I may combine some of these playlists so that a random episodes from a few different shows could be played.

The issue I am having is that the <order>random</order> field covered by the wiki article: http://wiki.xbmc.org/index.php?title=Smart_Playlist, is not seeming to return the results in random order. They always return in episode order, so the first episode of the first season is always played first and so on.

I'm using the latest GIT Trunk, but I get the same results with the latest GIT Eden branch as well.

Below is one of the playlists I wrote for the show "Leverage"
Code:
<?xml version="1.0"?>
<smartplaylist type="tvshows">
  <name>Random Leverage</name>
  <match>all</match>
  <rule field="tvshow" operator="is">Leverage</rule>
  <limit>0</limit>
  <order>random</order>
</smartplaylist>

Anyone have any ideas on what I'm doing wrong?


- &gt;&gt;X&lt;&lt; - 2012-01-12

In whatever view your using to display your playlist you need to change how that view is sorted, you need to set that view to "Sort by Playlist"


- mkortstiege - 2012-01-12

I guess you want smartplaylist type = "episodes".

EDIT:

Example ..

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Random Dexter</name>
    <match>all</match>
    <rule field="tvshow" operator="is">Dexter</rule>
    <order direction="ascending">random</order>
</smartplaylist>



- Zeqad1ous - 2012-01-12

@vdrfan : Thanks I'll try that.

EDIT

That works! Thanks so much.


- mkortstiege - 2012-01-12

Glad to hear. Thanks for the feedback.