Kodi Community Forum

Full Version: OLD TV - Kodi alternating between two folders
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everybody,

i have this small project that need some Help.
i wanted to build a PI with Kodi on it and connect it to an CRT-TV to play random old TV Shows. So if i turn on my TV it would be like watching TV in the 90s.  Cool

As of now, its works pretty well. The Pi is running, and when im turning my TV on, it plays a random Show or Advertisement to enjoy.
But here is where i need some Help. I want Kodi to alternate between two Folders, and choose a Random file. 

So it would be like this:
1. random TV Show plays (from the TV folder of my usb-stick)
2. random Advertisement plays (from the Ad folder of my usb-stick)
3. random TV Show plays (from the TV folder of my usb-stick)
4. random Advertisement plays (from the Ad folder of my usb-stick)

You get the idea  Wink

Im using a autoexec.py script that looks like this:

import xbmc
xbmc.executebuiltin("PlayMedia(/var/media/STICK/videos,isdir)")
xbmc.executebuiltin("PlayerControl(RandomOn)")
xbmc.executebuiltin("PlayerControl(RepeatAll)")

i hope its not too confusing, and somebody can help me with my problem Smile