aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Playlist.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2008-11-17 15:42:54 +0100
committerFelix Domke <tmbinc@elitedvb.net>2008-11-17 15:42:54 +0100
commita34ef895210161a8820e96829ac87806566e7858 (patch)
tree55b9f104dbbdd8a1d72e598b989421f839576b9a /lib/python/Components/Playlist.py
parent588010098dbcc24b82ea736feec6b6056cffd2e3 (diff)
parent153e0ed5048c79c600e1acd085b62015b7314ba7 (diff)
downloadenigma2-a34ef895210161a8820e96829ac87806566e7858.tar.gz
enigma2-a34ef895210161a8820e96829ac87806566e7858.zip
Merge branch 'master' into tmbinc/FixTimingBugs
Conflicts: lib/dvb/sec.cpp lib/python/Components/Network.py lib/python/Components/Playlist.py lib/python/Plugins/Extensions/DVDBurn/Process.py lib/python/Plugins/Extensions/MediaPlayer/plugin.py lib/python/Screens/TimerEdit.py po/lt.po po/nl.po po/tr.po
Diffstat (limited to 'lib/python/Components/Playlist.py')
-rw-r--r--lib/python/Components/Playlist.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/python/Components/Playlist.py b/lib/python/Components/Playlist.py
index 744ee3af..c9ebe479 100644
--- a/lib/python/Components/Playlist.py
+++ b/lib/python/Components/Playlist.py
@@ -58,6 +58,7 @@ class PlaylistIOM3U(PlaylistIO):
def open(self, filename):
self.clear()
+ self.displayname = None
try:
file = open(filename, "r")
except IOError:
@@ -66,14 +67,22 @@ class PlaylistIOM3U(PlaylistIO):
entry = file.readline().strip()
if entry == "":
break
- if entry[0] != "#":
+ if entry.startswith("#EXTINF:"):
+ extinf = entry.split(',',1)
+ if len(extinf) > 1:
+ self.displayname = extinf[1]
# TODO: use e2 facilities to create a service ref from file
+ elif entry[0] != "#":
if entry[0] == "/":
- self.addService(ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + entry))
+ sref = ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + entry)
elif entry.startswith("http"):
- self.addService(ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + entry.replace(':',"%3a")))
+ sref = ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + entry.replace(':',"%3a"))
else:
- self.addService(ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + os.path.dirname(filename) + "/" + entry))
+ sref = ServiceReference("4097:0:0:0:0:0:0:0:0:0:" + os.path.dirname(filename) + "/" + entry)
+ if self.displayname:
+ sref.ref.setName(self.displayname)
+ self.displayname = None
+ self.addService(sref)
file.close()
return self.list