from Components.ActionMap import NumberActionMap
from Components.Label import Label
from Components.Input import Input
-from Components.GUIComponent import *
from Components.Pixmap import Pixmap
from Components.Label import Label
from Components.FileList import FileEntryComponent, FileList
self.addPlaylistParser(PlaylistIOPLS, "pls")
self.addPlaylistParser(PlaylistIOInternal, "e2pls")
- self.filelist = FileList(resolveFilename(SCOPE_MEDIA), matchingPattern = "(?i)^.*\.(mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob)", useServiceRef = True)
+ # 'None' is magic to start at the list of mountpoints
+ self.filelist = FileList(None, matchingPattern = "(?i)^.*\.(mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob)", useServiceRef = True)
self["filelist"] = self.filelist
self.playlist = PlayList()
text = ""
if self.currList == "filelist":
if not self.filelist.canDescent():
- text = self.filelist.getServiceRef().getPath()
+ r = self.filelist.getServiceRef()
+ if r is None:
+ return
+ text = r.getPath()
if self.currList == "playlist":
- text = self.playlist.getSelection().getPath()
+ t = self.playlist.getSelection()
+ if t is None:
+ return
+ text = t.getPath()
self["currenttext"].setText(os.path.basename(text))
self.filelist.descent()
self.updateCurrentInfo()
else:
+ self.stopEntry()
self.playlist.clear()
self.copyDirectory(os.path.dirname(self.filelist.getSelection()[0].getPath()) + "/", recursive = False)
self.playServiceRefEntry(self.filelist.getServiceRef())