Picture Slideshow update from external folder

Hi,

I have been trying to make a slideshow in Kodi which will automatically load on start up and play a slide show from a folder stored in a remote location.

Using some very useful work arounds in this forum I have it almost working as I need now but I have one more hurdle to overcome.

The code I have adapted from this site is as follows.

autoexec.py (to load on start up) works great

PHP Code:
import xbmc

xbmc.executebuiltin('XBMC.RunScript("special://home/slideshow.py")'

slideshow.py

PHP Code:
import xbmc

from time import sleep
from os import listdir

minutes 1
picfolder 
"Pictures"

l1 = []
while 
1:
 
l2 listdir(picfolder)
 if (
l1 != l2):
   
xbmc.executebuiltin("ActivateWindow(Pictures,Pictures)")
   
xbmc.executebuiltin("Action(Play)")
   
l1 l2
 
for seconds in range(minutes 60):
   
sleep(1

‘Pictures’ links to a remote folder via FTP. This part works fine. My sources.xml file shows the ftp path to the name Pictures.

What i’snt working is the ‘listdir’, ‘picfolder’ should be a link to the folder that stores the picture so that it can check for changes. If I use something like ‘C://Pictures’ it works fine but because I am trying to get this information from a remote folder it keeps saying that it cannot be found. I have tried ‘Pictures’, ‘ftp://”server address”‘ but still cant get it to go.

So I guess my question is how can get listdir to work with an ftp connection.

Hope you can help