libsaria: Fix saving playlists
I was still using old functions, rather than my new ones.
This commit is contained in:
parent
1f84f2755b
commit
071257d77d
|
@ -64,7 +64,7 @@ def decode_xspf(child):
|
||||||
callbacks.load_playlist()
|
callbacks.load_playlist()
|
||||||
|
|
||||||
def encode_xspf(doc, node, id):
|
def encode_xspf(doc, node, id):
|
||||||
filepath = get_attrs(id, "filepath")
|
filepath = get_attrs(id, "filepath")[0]
|
||||||
track = add_child(doc, node, "track")
|
track = add_child(doc, node, "track")
|
||||||
location = add_child(doc, track, "location")
|
location = add_child(doc, track, "location")
|
||||||
add_text(doc, location, "file://%s" % filepath)
|
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/"})
|
child = add_child(doc, doc, "playlist", {"version":1, "xmlns":"http://xspf.org/ns/0/"})
|
||||||
tlist = add_child(doc, child, "trackList")
|
tlist = add_child(doc, child, "trackList")
|
||||||
|
|
||||||
for id in playlist.walk():
|
for id in playlist.list_ids():
|
||||||
encode_xspf(doc, tlist, id)
|
encode_xspf(doc, tlist, id)
|
||||||
|
|
||||||
fout = open(filepath, 'w')
|
fout = open(filepath, 'w')
|
||||||
|
|
Loading…
Reference in New Issue