X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/fdb15fdd11d88b73900badf092cf2db0e8d3aabf..c69bb079fef352b7b34eac8739b0dc051629cb7b:/lib/python/Plugins/Extensions/PicturePlayer/plugin.py diff --git a/lib/python/Plugins/Extensions/PicturePlayer/plugin.py b/lib/python/Plugins/Extensions/PicturePlayer/plugin.py index b6699bab..a426866e 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 @@ -94,7 +94,7 @@ class ThumbView(Screen): self["label0"].setText(_("no Picture found")) self.ThumbTimer = eTimer() - self.ThumbTimer.timeout.get().append(self.showThumb) + self.ThumbTimer.callback.append(self.showThumb) self.fillPage() @@ -196,13 +196,13 @@ class PicView(Screen): - + - - - - - + + + + + """ def __init__(self, session, filelist, name, path): @@ -244,11 +244,11 @@ class PicView(Screen): self["pause"] = Pixmap() self.decodeTimer = eTimer() - self.decodeTimer.timeout.get().append(self.decodePic) + self.decodeTimer.callback.append(self.decodePic) self.decodeTimer.start(300, True) self.slideTimer = eTimer() - self.slideTimer.timeout.get().append(self.slidePic) + self.slideTimer.callback.append(self.slidePic) def Pause(self): @@ -420,9 +420,9 @@ class PicSetup(Screen): class picmain(Screen): skin = """ - - - + + + @@ -457,7 +457,7 @@ class picmain(Screen): self["thumbnail"] = Pixmap() self.ThumbTimer = eTimer() - self.ThumbTimer.timeout.get().append(self.showThumb) + self.ThumbTimer.callback.append(self.showThumb) self.ThumbTimer.start(500, True) def up(self): @@ -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),