Bryan Schumaker
a3af3d053d
libsaria: New sequential next function for playlist
...
The new function exists in its own file to keep things simpler. Based
on the current song id, it finds the index in the playlist and returns
the next visible song.
2011-05-14 08:15:05 -04:00
Bryan Schumaker
0a1160f618
libsaria: Rename playlist's next() function
...
This is to prepare for creating a new file "next.py" dedicated to
choosing the next song. I also use this as an opportunity to pass the
current song id to the next function.
2011-05-14 07:48:11 -04:00
Bryan Schumaker
a950f06e10
libsaria: Don't always keep a set of visible songs
...
If the playlist isn't filtered there isn't much of a point in keeping
around a set of visible songs.
2011-05-13 22:54:27 -04:00
Bryan Schumaker
9056daae93
libsaria: Remove playlist startup() function
...
I should be able to do this on import, so it doesn't need its own
function.
2011-05-13 08:27:59 -04:00
Bryan Schumaker
202e75430e
libsaria: Add comment to playlist save()
...
The lock should be held while saving. Save should normally be called by
a function that already holds the lock, though.
2011-05-13 08:19:50 -04:00
Bryan Schumaker
ad7f780671
libsaria: Load playlist on import
...
I was doing this during startup already, so I might as well do it here.
2011-05-13 08:07:47 -04:00
Bryan Schumaker
194b436886
libsaria: Clean up playlist init
...
I removed some code that really didn't need to be used. I also moved
around some of the imports to make the file easier to follow.
2011-05-13 08:03:00 -04:00
Bryan Schumaker
132a66271c
libsaria: Move playlist load, save, and reset functions
...
I moved them to playlist.py so they can grab the lock and safely do
stuff. I save after adding or removing song ids. I also save after
resetting the playlist.
2011-05-12 22:34:36 -04:00
Bryan Schumaker
8b51871225
libsaria: Playlist uses new list functions
...
They were built in to the sources/ layer in 4.6. It makes sense to use
them for the playlist.
2011-05-12 08:25:44 -04:00
Bryan Schumaker
2afabfcf21
libsaria: remove ids from playlist (improved!)
...
I moved this to my new file. I grab the lock, remove each id, and then
unlock.
2011-05-12 08:11:35 -04:00
Bryan Schumaker
8bd914802e
libsaria: Move playlist's list to new file
...
It will be easier to work with from a new file, especially after I put
in functions for doing basic operations on it.
2011-05-11 23:05:47 -04:00
Bryan Schumaker
e2be97165e
libsaria: Move playlist to new directory
...
This will help me manage it better. My next task is to explode it into
multiple files.
2011-05-11 22:43:32 -04:00