Commit Graph

17 Commits

Author SHA1 Message Date
Bryan Schumaker
5f10a01bcb Always clear pause_after
Always clearing this ensures that we don't keep pausing after playback
is resumed.
2011-05-01 11:05:54 -04:00
Bryan Schumaker
ef5be29197 web: better controls
I split out the web controls to a new file, and can set the status of
the play button correctly when the page is loaded.  Finally, the
set_play_button() function is called on a timer so changes on the
application will be reflected on the web page eventually.
2010-12-27 19:00:27 -05:00
Bryan Schumaker
1c4621a79a Set random directly
This makes much more sense than toggling it.  Toggling caused an
inconsistent state during testing.
2010-12-23 09:51:09 -05:00
Bryan Schumaker
66a3344121 Controls pref initialization
The preferences variable should be initialized earlier to avoid an error
during startup.
2010-12-18 15:06:18 -05:00
Bryan Schumaker
0eb3a15783 Add functions for controlling "like"
This patch adds a function for getting the "like" status of the current
song.  It also changes the "set_like" function to use an event, rather
than just setting it.
2010-12-18 11:03:25 -05:00
Bryan Schumaker
7c2778614d Added control to set like value
First, this patch adds a function for setting attributes for the current
file.  Second, it adds a function for specifically setting the "like"
attribute.
2010-12-17 23:33:05 -05:00
Bryan Schumaker
0c254aa957 Remove score changing code
I am switching to a like / dislike system, so I don't need to worry
about scores anymore.
2010-12-17 23:18:19 -05:00
Bryan Schumaker
4e5995ec64 Added pause_after control to libsaria
This gives me a chance to remove it as a plugin.  I noticed that
sometimes I would hear a fraction of a second of music before the
pausing started.  This should fix that.
2010-12-17 23:00:45 -05:00
Bryan Schumaker
3abc80bdc4 Add seeking to controls
Seeking should be part of controls, rather than existing independently
as part of the audio package.  This patch moves the seeking functions,
and removes the need to pass a specific number of seconds.
2010-12-16 22:08:26 -05:00
Bryan Schumaker
677240eabe Added toggle_play()
This function will call play() if audio is currently paused.  It will
call pause() all other times.
2010-12-15 22:26:45 -05:00
Bryan Schumaker
6fc8415838 next() selects from queue
We check the queue for a song first, then go to the playlist.
2010-12-12 14:45:30 -05:00
Bryan Schumaker
f063da5b56 Began work on virtual sources
Virtual sources should make it easier to do things with the current song
without having to know anything about it (such as a song id or file
path).
2010-12-05 17:11:41 -05:00
Bryan Schumaker
36ce963d11 Initialize controls in two parts
This gives us a chance to initialize random early, and then grab the
audio functions later (when they exist)
2010-12-03 08:35:13 -05:00
Bryan Schumaker
efe45371db Move set_volume() and toggle_rand() 2010-12-03 08:31:04 -05:00
Bryan Schumaker
cc6772d596 Move stop features to libsaria.controls.py 2010-12-03 08:31:04 -05:00
Bryan Schumaker
fefde40e82 Moved play and pause to libsaria/controls.py
They have been moved from libsaria/audio/__init__.py.
2010-12-03 08:31:04 -05:00
Bryan Schumaker
b5da80d6c2 Add libsaria/controls.py
I will eventually be moving things over to here.  The general rule: if
it has to do with buttons on the gui, then it should probably be
considered a control.
2010-12-03 08:31:03 -05:00