libsaria: Fix saving playlists

I was still using old functions, rather than my new ones.
This commit is contained in:
Bryan Schumaker 2011-05-29 18:22:29 -04:00
parent 1f84f2755b
commit 071257d77d
1 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ def decode_xspf(child):
callbacks.load_playlist()
def encode_xspf(doc, node, id):
filepath = get_attrs(id, "filepath")
filepath = get_attrs(id, "filepath")[0]
track = add_child(doc, node, "track")
location = add_child(doc, track, "location")
add_text(doc, location, "file://%s" % filepath)
@ -83,7 +83,7 @@ def save_playlist(filepath):
child = add_child(doc, doc, "playlist", {"version":1, "xmlns":"http://xspf.org/ns/0/"})
tlist = add_child(doc, child, "trackList")
for id in playlist.walk():
for id in playlist.list_ids():
encode_xspf(doc, tlist, id)
fout = open(filepath, 'w')