(2020-07-23, 19:09)iceman20k Wrote: (2020-07-23, 18:45)pkscout Wrote: I have a music playlist that does something similar. I have a playlist called Mainstream, and then another called Mainstream - Curated. The second playlist has the rules PLAYLIST IS MAINSTREAM plus a second rule based on some other metadata. I think you might get close to what you want by creating a playlist with the 100 TV shows and then a second one that has a rule of PLAYLIST IS LAST100 (or whatever you name it) and then set the second playlist to random order and limited to 50 items.
Sorry, i dont really understand how you've done it. Can you maybe post your Playlist on https://paste.kodi.tv/ please?
The problem is that what i need is some sort of "nested select" statement. Like "select top 50 from (select * from tv_shows order by lastplayed limit 100)" and a selection of a playlist is currently not possible as far as i understood.
Assuming you just want a list of shows (not a list of episodes from a list of shows), here's what I just did on my dev machine.
Playlist 1 (this is a list of the 100 TV shows I've watched most recently, you said in the OP that you had this one figured out already):
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
<name>100 TV Shows</name>
<match>all</match>
<limit>100</limit>
<order direction="ascending">lastplayed</order>
</smartplaylist>
Playlist 2 (this is 10 random shows from the list of shows generated by playlist 1 - you can obviously do 50 instead):
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
<name>Random from Top 100</name>
<match>all</match>
<rule field="playlist" operator="is">
<value>100 TV Shows</value>
</rule>
<limit>10</limit>
<order direction="ascending">random</order>
</smartplaylist>
It's worth noting that in my test for some reason the second playlist didn't always generate 10 shows. I don't know why. But maybe it'll get you down the right path.