From cbfffe567b8f10fcadea7619f80d954ad879cff9 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Sun, 7 Oct 2007 10:31:35 +0000 Subject: 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) --- lib/python/Plugins/Extensions/PicturePlayer/plugin.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/python') 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), -- cgit v1.2.3