1 from ServiceReference import ServiceReference
7 # returns a list of services or None if filename is not a valid playlist
8 def open(self, filename):
15 UNSUPPORTED_FILES_IN_PLAYLIST = 4
17 def save(self, filename = None):
23 def addService(self, service):
24 self.list.append(service)
27 class PlaylistIOInternal(PlaylistIO):
29 PlaylistIO.__init__(self)
31 def open(self, filename):
34 file = open(filename, "r")
38 entry = file.readline().strip()
41 self.addService(ServiceReference(entry))
45 def save(self, filename = None):
46 print "Writing playlist into file", filename
47 file = open(filename, "w")
49 file.write(str(x) + "\n")