def PlaylistEntryComponent(serviceref, state):
res = [ serviceref ]
- res.append((eListboxPythonMultiContent.TYPE_TEXT,25, 0, 470, 32, 0, RT_VALIGN_CENTER, path.split(serviceref.getPath().split('/')[-1])[1]))
+ text = serviceref.getName()
+ if text is "":
+ text = path.split(serviceref.getPath().split('/')[-1])[1]
+ res.append((eListboxPythonMultiContent.TYPE_TEXT,25, 0, 470, 32, 0, RT_VALIGN_CENTER, text))
png = None
if state == STATE_PLAY:
png = PlayIcon
def addFile(self, serviceref):
self.list.append(PlaylistEntryComponent(serviceref, STATE_NONE))
+ def updateFile(self, index, newserviceref):
+ if index < len(self.list):
+ self.list[index] = PlaylistEntryComponent(newserviceref, STATE_NONE)
+
def deleteFile(self, index):
if self.currPlaying >= index:
self.currPlaying -= 1