Display actual song names for Audio CDs with CD-Text feature (requires libcdio)
[enigma2.git] / lib / python / Components / MediaPlayer.py
index 84f7bec7b9ddd7db68f07d6d6664564c3787daa5..50de290dfbfc19eee91586205cf07e107fa8c56a 100644 (file)
@@ -22,7 +22,10 @@ ForwardIcon = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/i
 
 def PlaylistEntryComponent(serviceref, state):
        res = [ serviceref ]
 
 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
        png = None
        if state == STATE_PLAY:
                png = PlayIcon