Bryan Schumaker
50cded315e
bump bug version
2011-05-01 11:05:55 -04:00
Bryan Schumaker
47f33a3f8f
libsaria: Don't save on preference initialization
...
When a preference is initially created, it should be set to a default
value. If it is set to a default value, then we don't need to save it
immediately. Let's wait until it changes before actually doing a
save...
2011-05-01 11:05:55 -04:00
Bryan Schumaker
802513c726
libsaria: Don't immediately enable preference saving
...
We shouldn't need to save preferences during startup because at this
point only the initial values have been set. If nothing is changed,
then nothing needs to be saved and we can save some time. This should
also prevent any problems caused by crashing during a save.
2011-05-01 11:05:55 -04:00
Bryan Schumaker
e812fbaee0
Don't filter when there are no terms
...
If there are no terms to filter on, we should return a set of all items.
This will show all songs when a space has been entered into the filter
bar.
2011-05-01 11:05:54 -04:00
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
6201f707cb
Mark __dev__ as False
...
4.3 is almost done!
2010-12-30 11:26:20 -05:00
Bryan Schumaker
6fc6bb60f6
Set play button status correctly when stopped
...
The stop function needs to return True if it is successful.
2010-12-27 19:09:07 -05: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
0c636bfd56
Clean up universal_open()
...
The cleaned up version chooses what function to call based on file
extention. I use map.get() to pick a function, and use the open_music()
function as the default.
2010-12-27 12:06:22 -05:00
Bryan Schumaker
0b8bc2d7fc
Fix choosing random song when playlist is filtered
...
I was setting cur_index based on the index into the visible set, rather
than the index into the entire song list.
2010-12-23 09:53:30 -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
270d33d5ec
Reset playlist before loading xspf file
...
Loading an xspf file should replace the current playlist, rather than
add to it.
2010-12-18 16:45:48 -05:00
Bryan Schumaker
aa0f832356
Refresh the playlist after loading
...
After we load an xspf file, we should refresh the playlist to reflect
changes.
2010-12-18 16:44:18 -05:00
Bryan Schumaker
da99d4b349
Load xspf playlists
...
This patch adds loading of xspf playlists
2010-12-18 16:39:17 -05:00
Bryan Schumaker
77f065b703
Export playlist to xspf
...
This patch adds support for saving a playlist as an xspf xml file. I
only use the <location> tag to keep it simple.
2010-12-18 16:22:06 -05:00
Bryan Schumaker
da1a5413a4
Library source subdirectory filtering
...
When we add a path to the sources list, we should remove all paths that
are a subdirectory of the new path.
2010-12-18 15:35:51 -05:00
Bryan Schumaker
8d423629be
Add fewer library sources
...
If we are being asked to add a path that is a subdirectory of a current
library source then we shouldn't add it.
2010-12-18 15:28:53 -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
3c2f40c69e
Move backup.py -> export.py, import v1.3 library
...
The move was supposed to be in the previous patch ... oops.
This one also adds in importing a v1.3 library xml file.
2010-12-18 15:03:24 -05:00
Bryan Schumaker
f869b17e2f
Rename backup functions
...
Backup has been renamed to export
Restore has been renamed to import_xml
2010-12-18 14:52:31 -05:00
Bryan Schumaker
c08655c1fa
More reformatting and comments
2010-12-18 14:49:35 -05:00
Bryan Schumaker
c49a39ad46
Encode v1.3 library
...
This patch changes the encode functions to export a v1.3 library
2010-12-18 14:46:31 -05:00
Bryan Schumaker
cafc19fbed
Don't set score when importing library
...
The score system has been replaced with a like / dislike system. Score
is no longer an attribute that can be set.
2010-12-18 14:36:21 -05:00
Bryan Schumaker
8349efe8c7
Library export formatting changes
...
This patch rearranges the decode functions to put decoders for a single
version together. I also removed some extra whitespace and clearly
labeled the decoding sections.
2010-12-18 14:33:17 -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
f55cb44a64
Fix set_attr()
...
First, set_attr() needs to find the id of the current song. Second, we
should save after changing attributes.
2010-12-18 11:02:32 -05:00
Bryan Schumaker
076e89783a
Add save() to the Source class
...
This will allow us to save any changes made to the Source()
2010-12-18 11:01:44 -05:00
Bryan Schumaker
401241ac47
Track recent songs for sequential next too
...
Why was I only adding recent songs to the list when picking a random
song? It really doesn't make any sense. This patch tracks recent songs
any time next() is called in the playlist.
2010-12-18 09:36:01 -05:00
Bryan Schumaker
2d0643dd7b
Just skip songs the user doesn't like
...
If the user doesn't like a song, we shouldn't have a 25% chance of
playing the song anyway. We should just pick a different song.
2010-12-18 09:27:01 -05:00
Bryan Schumaker
0bcb444317
Remove score field
...
This patch removes the score field from the Track() class
2010-12-17 23:37:06 -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
d91c099723
Added set_attr to the Source() class
...
Having access to the set_attr function should allow us to change
attributes for the current track easily.
2010-12-17 23:28:55 -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
6449b6badb
Skip songs based on like, rather than score
...
I think I can get a better guess for what users like based on what they
tell me, rather than trying to analyze their playback habits.
2010-12-17 23:15:19 -05:00
Bryan Schumaker
da6b0fd3eb
Add "like" field to the Track() class
...
This will allow the users to tell us if they do or don't like a song.
Songs default to None for unrated songs.
2010-12-17 23:06:46 -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
b5fef6ba3c
Check if cur_source is None
...
We should do this before attempting to return an ID...
2010-12-17 08:31:22 -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
b6c9c12ea9
Remove datetime module import
...
This was added to test timing changes for my recent pickle improvements.
2010-12-16 11:02:32 -05:00
Bryan Schumaker
84eb73d2a2
Pickling improvements
...
By using pickle correctly, I can now load in files significantly faster
than the old way. Library loading times have gone from about 3 seconds
to 0.25 seconds. I like this.
2010-12-16 09:29:06 -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
588a2bfb7a
Update library in background
...
This patch adds a function for updating the entire library in the
background.
2010-12-14 20:37:15 -05:00
Bryan Schumaker
646fc59c5c
Save playlist after choosing next
2010-12-12 14:47:19 -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
4acb972583
Play songs in the queue
...
Selecting songs in the queue will play the song and remove it from the
queue.
2010-12-12 14:28:19 -05:00
Bryan Schumaker
f47aa206d1
Remove songs from queue
...
I can now remove songs from the queue. Additionally, I only add songs
to the queue if they are not already in it.
2010-12-12 14:20:12 -05:00
Bryan Schumaker
c7c81c1b03
Queue reset
...
I can now reset the queue to an empty state.
2010-12-12 14:13:18 -05:00
Bryan Schumaker
e7bab2fc94
Queue filtering
...
The queue can now be filtered using the default text entry.
2010-12-12 14:04:36 -05:00
Bryan Schumaker
e997d4df33
Fill queue page
...
This patch shows what songs are currently in the queue.
2010-12-12 13:57:26 -05:00
Bryan Schumaker
1e3c48bbf1
Add songs to the Queue
...
I can add songs from both the library and the playlist to the queue
2010-12-12 13:54:38 -05:00