upd
This commit is contained in:
parent
d0eb203443
commit
ed5ed4b768
1 changed files with 10 additions and 1 deletions
|
|
@ -1,11 +1,20 @@
|
||||||
# Autoplay videodirectory
|
# Autoplay videodirectory
|
||||||
import os, xbmc
|
import os, xbmc
|
||||||
|
import re
|
||||||
|
|
||||||
# set path to dir you want to play
|
# set path to dir you want to play
|
||||||
path = "/var/media/USB"
|
path = "/var/media/USB"
|
||||||
|
|
||||||
|
# filter out unwanted
|
||||||
|
|
||||||
|
# dot(.) files
|
||||||
|
PATTERN1 = re.compile(r"^\..+")
|
||||||
|
# System Volume Information folder
|
||||||
|
PATTERN2 = re.compile(r"System Volume Information")
|
||||||
|
|
||||||
dirList = os.listdir(path)
|
dirList = os.listdir(path)
|
||||||
dirList[:] = [d for d in dirList if not os.path.isdir(path + d)]
|
dirList[:] = [d for d in dirList if not PATTERN1.match(d)]
|
||||||
|
dirList[:] = [d for d in dirList if not PATTERN2.match(d)]
|
||||||
|
|
||||||
videoList = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
videoList = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
|
||||||
videoList.clear()
|
videoList.clear()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue