From e5784ad0bf002b26befbbffbf5ebea5a01ceb2c7 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Wed, 22 Nov 2006 13:06:20 +0000 Subject: [PATCH] some picplayer fixes --- lib/python/Components/FileList.py | 6 ++- .../PicturePlayer/data/pic_frame.png | Bin 324 -> 275 bytes .../Extensions/PicturePlayer/plugin.py | 44 +++++++++++++----- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py index 0c8a8814..7621ccb0 100644 --- a/lib/python/Components/FileList.py +++ b/lib/python/Components/FileList.py @@ -25,6 +25,7 @@ EXTENSIONS = { "jpg": "picture", "jpeg": "picture", "png": "picture", + "bmp": "picture", "ts": "movie", "avi": "movie", "mpg": "movie", @@ -86,7 +87,10 @@ class FileList(MenuList, HTMLComponent, GUIComponent): if directory is None: # present available mountpoints print "listing partitions:" for p in harddiskmanager.getMountedPartitions(): - self.list.append(FileEntryComponent(name = p.description, absolute = p.mountpoint, isDir = True)) + if p.mountpoint == "/": + self.list.append(FileEntryComponent(name = p.description, absolute = p.mountpoint, isDir = True)) + else: + self.list.append(FileEntryComponent(name = p.description, absolute = p.mountpoint + "/", isDir = True)) files = [ ] directories = [ ] elif self.useServiceRef: diff --git a/lib/python/Plugins/Extensions/PicturePlayer/data/pic_frame.png b/lib/python/Plugins/Extensions/PicturePlayer/data/pic_frame.png index eb9ae771146d260fc1652d2dc2d060c5e2f382db..11a9752147aac9ec06033cf12c544a7df25613d5 100644 GIT binary patch literal 275 zcmeAS@N?(olHy`uVBq!ia0vp^`+)ca2Q!dNytuj;NU;U@gt-3y|357)t?ymV0-y+E zNswPKgTu2MX+X|yPZ!6KinzBI4stRm2(WC7ezQOAsM5QQ6ILqt7@eJ4^>6OAO?C2v h4A^fy``r9H!-8k5b1pxBqz3c`gQu&X%Q~loCIB+vLJI%@ literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^`+)ca2Q!dNytuj;NC^e_gt-3y|33{CENoT?1JnX_F#Qp@==faXdx zysi9@FPWpWg=<#S?_ZOnKD);cDo`K%I*gg!g@M61JYbqjAi T? 0: + for x in self.filelist.getFileList(): + if x[0][1] == True: + val += 1 + self.filelist.moveToIndex(val) def StartExif(self): if not self.filelist.canDescent(): - self.session.open(ExifView, self.currDir + self.filelist.getSelection()[0], self.filelist.getSelection()[0]) + self.session.open(ExifView, self.filelist.getCurrentDirectory() + self.filelist.getFilename(), self.filelist.getSelection()[0]) def Settings(self): self.session.open(PicSetup) def Exit(self): - config.pic.lastDir.value = self.currDir + if self.filelist.getCurrentDirectory() is None: + config.pic.lastDir.value = "/" + else: + config.pic.lastDir.value = self.filelist.getCurrentDirectory() config.pic.save() self.close() -- 2.30.2