[neurosetta] Re: More on Playlists
Joseph Martin
jmartin at desertflood.com
Wed Jul 2 09:21:15 PDT 2003
Hello,
I'm hoping a positron guru can help me with this. I'm attempting to add some
playlists to my Neuros. I've put together the following code to create a playlist:
from positron import neuros
import sys
myn = neuros.Neuros('/home/martinja')
db = myn.open_db('audio')
pldb = db.children[0]
if len(sys.argv) > 1:
pldb.add_record([sys.argv[1]])
myn.close_db('audio')
----------------------------------------------------------------------
and this code to print the playlists currently on the device:
from positron import neuros
myn = neuros.Neuros('/home/martinja')
db = myn.open_db('audio')
pldb = db.children[0]
rec = pldb.get_records()
for pl in rec:
if pl:
print "Playlist: %s" % pl[0]
----------------------------------------------------------------------
Can anyone help me with code to actually add a track to the playlist? What kind
of record do I need to add to the audio db?
Thanks!
~joe
--
Joseph (LittleRed) Martin
jmartin at desertflood.com
http://www.desertflood.com/
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Neurosetta homepage: http://www.neurosetta.org/
To unsubscribe from this list, send a message to 'neurosetta-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Neurosetta
mailing list