Smart playlists/Examples

From Official Kodi Wiki
< Smart playlists
Revision as of 02:47, 14 November 2020 by Karellen (talk | contribs) (Page creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Smart Playlists Contents

Home icon grey.png   ▶ Playlists ▶ Smart playlists ▶ Examples


Examples of XSP code for Smart Playlists.


Movies

In progress movies

Moives that are still in progress ordered by last played.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>In progress movies</name>
    <match>all</match>
    <rule field="inprogress" operator="true" />
    <order direction="descending">lastplayed</order>
</smartplaylist>


Last played movies (history)

Not in progress movies with a play count bigger than 0 ordered by last played.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Last played movies (history)</name>
    <match>all</match>
    <rule field="inprogress" operator="false" />
    <rule field="playcount" operator="greaterthan">
        <value>0</value>
    </rule>
    <order direction="descending">lastplayed</order>
</smartplaylist>


Movies with a specific subtitle language

Movies that contain Swedish (swe) internal subtitles.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Movies with Swedish subs</name>
    <match>all</match>
    <rule field="subtitlelanguage" operator="is">
        <value>swe</value>
    </rule>
    <group>none</group>
</smartplaylist>


One random movie

Only one movie is added to the playlist. This isn't possible to create in the GUI because the lower limit is 10 (or at least the limit needs to be edited afterward).
Even though the limit is only one you still need to set random order.

Though the difference between a playlist containing the GUI minimum 10 or edited to contain only 1 isn't significant. Pressing play on both of them will play a random movie. The "benefit" with a playlist only containing one movie is that you'll only be presented with one if you open the playlist.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Random movie</name>
    <match>all</match>
    <rule field="playcount" operator="is">
        <value>0</value>
    </rule>
    <limit>1</limit>
    <order direction="ascending">random</order>
</smartplaylist>



TV Shows

Last played TV shows

TV shows that've been played in the last 3 months ordered by last played with play count 0.

The play count setting makes it so if all episodes have been watched it doesn't show up, but as soon new unplayed episodes or seasons are scraped the TV Show will show up again in the playlist.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
    <name>Last played TV shows</name>
    <match>all</match>
    <rule field="lastplayed" operator="inthelast">
        <value>3 months</value>
    </rule>
    <rule field="playcount" operator="is">
        <value>0</value>
    </rule>
    <order direction="descending">lastplayed</order>
</smartplaylist>


Episodes

In progress episodes

Episodes that are still in progress from the last 2 weeks ordered by last played.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>In progress episodes</name>
    <match>all</match>
    <rule field="lastplayed" operator="inthelast">
        <value>2 weeks</value>
    </rule>
    <rule field="inprogress" operator="true" />
    <order direction="descending">lastplayed</order>
</smartplaylist>


Last played episodes (history)

Not in progress episodes and with a play count bigger than 0 from the last 6 months ordered by last played.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Last played episodes (history)</name>
    <match>all</match>
    <rule field="lastplayed" operator="inthelast">
        <value>6 months</value>
    </rule>
    <rule field="inprogress" operator="false" />
    <rule field="playcount" operator="greaterthan">
        <value>0</value>
    </rule>
    <order direction="descending">lastplayed</order>
</smartplaylist>


Random unplayed episodes from a TV show

10 random episodes with a play count of 0 from The Simpsons.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Random episodes - The Simpsons</name>
    <match>all</match>
    <rule field="tvshow" operator="is">
        <value>The Simpsons</value>
    </rule>
    <rule field="playcount" operator="is">
        <value>0</value>
    </rule>
    <limit>10</limit>
    <order direction="ascending">random</order>
</smartplaylist>


Random unplayed episodes from several TV shows

10 random episodes with a play count of 0 (i.e. unplayed) from six different shows. Though as it's random this can create a list with two to ten episodes of the same show in a row.

If you specifically want to watch 6 random episodes from 6 different shows you could create playlists that are limited to 1 episode and 1 show (see One random movie example). Then you queue the 6 playlists.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>Random episodes - AAFFSS</name>
    <match>all</match>
    <rule field="tvshow" operator="is">
        <value>American Dad</value>
        <value>Archer</value>
        <value>Family Guy</value>
        <value>Futurama</value>
        <value>South Park</value>
        <value>The Simpsons</value>
    </rule>
    <rule field="playcount" operator="is">
        <value>0</value>
    </rule>
    <limit>10</limit>
    <order direction="ascending">random</order>
</smartplaylist>


TV show with specific episode names

A playlist with The Simpsons' Treehouse of Terror episodes.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="episodes">
    <name>The Simpsons - Treehouse of Horror</name>
    <match>all</match>
    <rule field="title" operator="contains">
        <value>Treehouse</value>
    </rule>
    <rule field="tvshow" operator="is">
        <value>The Simpsons</value>
    </rule>
</smartplaylist>


Music Videos

Songs

Recently played songs

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="songs">
    <name>Recently Played Songs</name>
    <match>all</match>
    <rule field="lastplayed" operator="inthelast">
        <value>2 weeks</value>
    </rule>
    <order direction="descending">lastplayed</order>
</smartplaylist>


Rock music from the 1970s

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="songs">
    <name>Rock Music from the 1970s</name>
    <match>all</match>
    <rule field="genre" operator="is">
        <value>Rock</value>
    </rule>
    <rule field="year" operator="greaterthan">
        <value>1969</value>
    </rule>
    <rule field="year" operator="lessthan">
        <value>1980</value>
    </rule>
</smartplaylist>



Top 100 songs

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="songs">
    <name>Top 100 Songs</name>
    <match>all</match>
    <rule field="playcount" operator="greaterthan">
        <value>0</value>
    </rule>
    <order direction="descending">playcount</order>
    <limit>100</limit>
</smartplaylist>


Album

Albums By Label

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="albums">
    <name>DECCA</name>
    <match>all</match>
    <rule field="label" operator="is">
        <value>DECCA</value>
    </rule>
</smartplaylist>



Artists

Return to top