Kodi Community Forum

Full Version: Autostart Slideshow will not play movies.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I have set up my xbmc to autostart with a slideshow, I created a file in .xbmc/userdata/autoexec.py and added this to it;

import xbmc
from time import sleep
from os import listdir

minutes = 1
picfolder = "//home//daniel//Pictures"

l1 = []
while 1:
    l2 = listdir(picfolder)
    if (l1 != l2):
        l1 = l2
    for seconds in range(minutes * 60):

This will start the slideshow and refresh the directory every few minutes detecting new pictures, the only issue is that it will not play videos any more.

If I use this script;

import xbmc

It will autostart the slideshow and play the videos but it will not refresh the directory detecting new pictures/video.

What I need help with is trying to figure out why the first script stops video from being played in the slideshow since I need the slideshow to refresh the directory and play the new files.

Any help would be greatly appreciated.
Does anyone have an idea of what I can do to figure this out?
Which xbmc version are you running and what does your Debug Log say when it's not opening the video's? but my guess is that this behaviour is a feature...
I have the same problem with openelec (intel build). Only the pictures show up when using a script.

I put a autoexec.py file under the userdata catalog.
This is the script I use:

import xbmc

(the slideshow catalogue contains both pictures and videos.)

Another method to start the slideshow is this:
Install a skin.
Then put the following line into the file in "/storage/.xbmc/addons/skin.transparency/720p/Startup.xml":

The results are the same. Only pictures shows up.

I have been trying for half a day to get this working. The funny thing is that it works fine when I start the slideshow manually.
Found a solution (openelec):

Put a autoexec.py file under the userdata catalog.
This is the script I use:

import xbmc


This starts both the video and the picture slideshow at boot.

(the path will look different on other OS's. However I believe if you use xbmc.executebuiltin("ActivateWindow(Pictures,Pictures)") it will work for all OS's. The autoexec.py might also have another placement and in some systems this file is named autostart.sh)