Updated the soap method GetPlaylist, the name of PlayList return variable.
authorHenry <hmmb@a01m02.(none)>
Fri, 17 Jul 2009 17:48:51 +0000 (13:48 -0400)
committerHenry <hmmb@a01m02.(none)>
Fri, 17 Jul 2009 17:48:51 +0000 (13:48 -0400)
zukebox_server/src/services/playlist/zb_playlist.py

index 3dd424a..d4daa3a 100644 (file)
@@ -26,6 +26,9 @@ class PlayList(Service):
     srvc_type = "urn:schemas-upnp-org:service:PlayList:1"
     srvc_name = "PlayList"
 
+    #list = [{'CurrentURI':'teste', 'CurrenteURIMetaData':'teste', 'FromName':'teste', 'ToName':'teste'},
+    #        {'CurrentURI':'teste', 'CurrenteURIMetaData':'teste', 'FromName':'teste', 'ToName':'teste'}]
+
     def __init__(self, positions, xml_path):
         scpd_path = pjoin(xml_path, "zukebox-playlist-scpd.xml")
         log.info("PlayList service scpd_path = %s" % scpd_path)
@@ -33,7 +36,7 @@ class PlayList(Service):
 
         self.positions = positions
         self.list = []
-        self.current = 0
+        self.current = None
         self.prev = self.current
         self.next = None
         self.from_name = None
@@ -116,10 +119,10 @@ class PlayList(Service):
         prev_uri = prev["cur_uri"]
         return {"PreviousItem": prev_uri}
 
-    def soap_GetPlaylist(self, *args, **kwargs):
+    def soap_GetPlayList(self, *args, **kwargs):
         """Get the playlist"""
-        playlist = self.list.__str__()
-        return {"Playlist": playlist}
+        playlist = str(self.get_playlist())
+        return {"PlayList": playlist}
 
 
     def clean_playlist(self):