Information Create your own day-by-day "TV program" using smart playlists and virtual folders!
#1
I tried to post this in "Tips, tricks, and step by step guides", but that isn’t allowed. Maybe a moderator could move it there. (Done)

Ever wondered how to automagically create a TV-like daily program schedule with KODI? Like maybe on Mondays (my "crime & mystery" day) show the next unwatched episode of a certain series, followed by a random crime/mystery movie?

This can actually be accomplished by setting up a few clever smart playlists, although you’ll need to edit a few of these manually to return only ONE result. (Please support my feature request at: 371219 (thread))

Let’s jump straight in, using KODI 19.5 and smart playlists with a real example!

1. On Mondays, I’d like to watch the next unwatched episode of a series called "Friesland", followed by a randomly selected crime/mystery movie. I wish to be able to simply select the playlist called "Monday" and play it, KODI taking care of the rest.

2. Let’s set up a smart playlist called "Next episode Friesland":

- Go to Videos → Playlists → New smart playlist… and enter the following:
- Type: Episodes
- Playlist name: Next episode Friesland
- Items must match: all of the rules
- Limit to: 10 items
- Order by: TV show
- Order: Ascending
- Rule 1: TV show — is — Friesland (use the name of the show YOU want to watch)
- Rule 2: Play count — is — 0

You can now try out this playlist—it should return the next 10 unwatched episodes and looks like this:

xml:

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

3. You now need to EDIT this playlist, using an appropriate text editor, so that the line

   
xml:
<limit>10</limit>

becomes

   
xml:
<limit>1</limit>

and save it back. It is stored in your KODI’s folder "special://profile/playlists/video".

If you have no direct access to that folder, like on an Amazon FireTV stick, you can use KODI’s file manager to copy it over to an SMB share, edit it there, and copy it back.

Test the playlist again on KODI. It should now return only ONE result: The next unwatched episode.

Hint: You can still modify the playlist using the UI, only DON’T try to change the "Limit to: 1 items".

4. Now let’s create a "Random crime movie" playlist:

- Go to Videos → Playlists → New smart playlist… and enter the following:
- Type: Movies
- Playlist name: Random crime movie
- Items must match: one or more of the rules
- Limit to: 10 items
- Order by: Random
- Order: ascending
- Group by: Default
- Rule 1: Genre — contains — Crime (adapt to your needs, use the Browse button)
- Rule 2: Genre — contains — Mystery (adapt to your needs, use the Browse button)

You can now try out this playlist—it should return a random list of 10 crime/mystery movies and looks like this:

xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Random crime movie</name>
    <match>one</match>
    <rule field="genre" operator="contains">
        <value>Crime</value>
    </rule>
    <rule field="genre" operator="contains">
        <value>Mystery</value>
    </rule>
    <limit>10</limit>
    <order direction="ascending">random</order>
</smartplaylist>

Again, edit and save this playlist, so that the line

   
xml:
<limit>10</limit>

becomes

   
xml:
<limit>1</limit>

Test the playlist again on KODI. It should now return only ONE result: A random crime/mystery movie.

5. Now let’s aggregate these into a "Monday" smart playlist:

- Go to Videos → Playlists → New smart playlist… and enter the following:
- Type: Movies
- Playlist name: Monday
- Items must match: all of the rules
- Limit to: No limit
- Order by: None
- Order: ascending
- Group by: None
- Rule 1: Title — is — no such movie (any rule that doesn’t return anything suffices)
- Rule 2: Virtual folder is — Next episode Friesland (use the Browse button)
- Rule 2: Virtual folder is — Random crime movie (use the Browse button)

We circumvent an odd KODI quirk here—without the "no such movie" rule KODI would return a long list of movies in addition to what’s in the virtual folders. In KODI, we can use a smart playlist as a "virtual folder". This allows us to aggregate series and movie playlist results into one "Monday" playing schedule!

You can now try out this playlist—it should return two nodes ("folders") that contain the next unwatched "Friesland" episode and a random crime movie, respectively.

By using the context menu on the "Monday" playlist, you can

- Play it
- Queue item into the system playlist (use LEFT → Go to playlist in the Video/Playlists view to show what’s in the playlist, or to empty it)
- Browse into it (select the "Next episode Friesland" or "Random crime movie" to see what got selected)

The "Monday" playlist file looks like this:

xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Monday</name>
    <match>all</match>
    <rule field="virtualfolder" operator="is">
        <value>Next episode Friesland</value>
    </rule>
    <rule field="virtualfolder" operator="is">
        <value>Random crime movie</value>
    </rule>
    <group>none</group>
    <limit>0</limit>
</smartplaylist>

6. Experiment and add more "day-by-day TV program" type playlists!

Please don’t forget to support my request to add 1/2/3/5 items to the playlist editor UI at 371219 (thread)! This would allow creating such playlists and schedules without any editing—just using the UI.

Enjoy!
Reply
#2
(2023-01-10, 19:02)Moonbase Wrote: I tried to post this in "Tips, tricks, and step by step guides", but that isn’t allowed. Maybe a moderator could move it there.

Done.
Always read the Wiki, FAQ and search the forum before posting.
Read/follow the forum rules.
Reply
#3
Thanks! Hope it’ll be helpful for some.

Note: I have been told that using "Play count — is — 0" might be unreliable. In some cases, it might have a NULL instead of zero. So please use "Play count — is less than — 1" instead in above examples.
Reply
#4
Might be of interest?  https://forum.kodi.tv/showthread.php?tid=346803
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#5
Thanks. PseudoTV Live looks like a LiveTV + EPG addon, while my post above only shows how to use smart playlists on a rather barebone KODI (no extra addons) to facilitate some minor scheduling using local files. Might come in handy for minimal hardware platforms (like a FireTV stick) and files stored on a NAS.
Reply
#6
(2023-01-11, 00:21)Moonbase Wrote: Thanks. PseudoTV Live looks like a LiveTV + EPG addon, while my post above only shows how to use smart playlists on a rather barebone KODI (no extra addons) to facilitate some minor scheduling using local files. Might come in handy for minimal hardware platforms (like a FireTV stick) and files stored on a NAS.

PseudoTV Live can turn your smart playlist into a virtual live tv channel.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply

Logout Mark Read Team Forum Stats Members Help
Create your own day-by-day "TV program" using smart playlists and virtual folders!0
This forum uses Lukasz Tkacz MyBB addons.