X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/2a8ecd871020fdd668cf5500460e5a6e7851b4b0..853a25f5b72ba119899baf8b1b50532e2900cfa9:/lib/python/Components/MediaPlayer.py diff --git a/lib/python/Components/MediaPlayer.py b/lib/python/Components/MediaPlayer.py index ef8d3a41..791274fc 100644 --- a/lib/python/Components/MediaPlayer.py +++ b/lib/python/Components/MediaPlayer.py @@ -3,7 +3,7 @@ from MenuList import MenuList from Tools.Directories import SCOPE_SKIN_IMAGE, resolveFilename from os import path -from enigma import eListboxPythonMultiContent, eListbox, RT_VALIGN_CENTER, gFont, eServiceCenter +from enigma import eListboxPythonMultiContent, RT_VALIGN_CENTER, gFont, eServiceCenter from Tools.LoadPixmap import LoadPixmap @@ -22,7 +22,10 @@ ForwardIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/i 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 @@ -61,6 +64,10 @@ class PlayList(MenuList): 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