aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2007-10-07 10:31:35 +0000
committerFelix Domke <tmbinc@elitedvb.net>2007-10-07 10:31:35 +0000
commitcbfffe567b8f10fcadea7619f80d954ad879cff9 (patch)
treecb352de14ddf9985a65e156a240410f668c9d00c /lib/python/Plugins/Extensions
parentfb0c2ceb0baeca3c112b466373cf9e1abeb36a40 (diff)
downloadenigma2-cbfffe567b8f10fcadea7619f80d954ad879cff9.tar.gz
enigma2-cbfffe567b8f10fcadea7619f80d954ad879cff9.zip
This fixed the PicturePlayer to check if a file is local rather than accepting files from all sources (which is unsupported), patch by Moritz Venn (003_enigma2_make_pictureplayer_scanner_only_detect_local.patch)
Diffstat (limited to 'lib/python/Plugins/Extensions')
-rw-r--r--lib/python/Plugins/Extensions/PicturePlayer/plugin.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py
index b6699bab..b305b653 100644
--- a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py
@@ -8,7 +8,7 @@ from Components.Label import Label
from Components.ConfigList import ConfigList
from Components.config import *
-from Tools.Directories import resolveFilename, pathExists, createDir, SCOPE_MEDIA
+from Tools.Directories import resolveFilename, fileExists, pathExists, createDir, SCOPE_MEDIA
from Components.FileList import FileList
from Components.AVSwitch import AVSwitch
@@ -537,8 +537,14 @@ def filescan_open(list, session, **kwargs):
def filescan(**kwargs):
from Components.Scanner import Scanner, ScanPath
+
+ # Overwrite checkFile to only detect local
+ class LocalScanner(Scanner):
+ def checkFile(self, file):
+ return fileExists(file.path)
+
return \
- Scanner(mimetypes = ["image/jpeg", "image/png", "image/gif", "image/bmp"],
+ LocalScanner(mimetypes = ["image/jpeg", "image/png", "image/gif", "image/bmp"],
paths_to_scan =
[
ScanPath(path = "DCIM", with_subdirs = True),