2015-03-18, 18:05
Hi,
I have a folder shared via nfs with a lots of animes that my daughter likes to watch. Usually I navigate to that folder and select to play the folder, then all the videos files in there are played fine.
Now I'm trying to create a script to automate this task, so I can put a link on the main screen of my skin so that my wife can eas[/code]ily play those videos for my daughter. The ideia of the script is to add all the videos to the playlist, shuffle it and start playing.
From some threads found here I have managed to do the following:
But it is not working. I got the following error (when calling os.listdir):
The nfs path is correct. Is it not working because nfs is not supported vy os.listdir? Or maybe because there are spaces on the pathname?
Anyone?
Thanks
I have a folder shared via nfs with a lots of animes that my daughter likes to watch. Usually I navigate to that folder and select to play the folder, then all the videos files in there are played fine.
Now I'm trying to create a script to automate this task, so I can put a link on the main screen of my skin so that my wife can eas[/code]ily play those videos for my daughter. The ideia of the script is to add all the videos to the playlist, shuffle it and start playing.
From some threads found here I have managed to do the following:
Code:
import os, xbmc
path="nfs://192.168.25.22/mnt/HDLivia/Series Kids/Galinha Pintadinha"
dirList=os.listdir(path)
videoList = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
videoList.clear()
for fname in dirList:
videoList.add(path + "/" + fname)
videoList.shuffle()
xbmc.executebuiltin("xbmc.playercontrol(RepeatAll)")
xbmc.Player().play(videoList)
But it is not working. I got the following error (when calling os.listdir):
Code:
Error Contents: (2, 'No such file or directory', 'nfs://192.168.25.22/mnt/HDLivia/Series Kids/Galinha Pintadinha/
The nfs path is correct. Is it not working because nfs is not supported vy os.listdir? Or maybe because there are spaces on the pathname?
Anyone?
Thanks