Commit Graph

86 Commits

Author SHA1 Message Date
Bryan Schumaker
975b153bea libsaria: Remove event.py
I've been looking forward to this.  The last several commits have
replaced the generic event system with a hardcoded callback system.
This should be more efficient, easier to understand, and easier to
follow.  I feel it is a better solution.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
e64f93ef39 libsaria: New library source callback
Triggered upon scanning a new path to add to the library.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
9f0d8efbb7 libsaria: playlist uses correct prefs.get() function
I forgot to change it over from get_pref()
2011-05-01 12:46:16 -04:00
Bryan Schumaker
3dc0b208cf libsaria: Integrate new preferences and storage code
This patch re-enables most of the libsaria startup procedures.  To allow
this, I had to switch over to the new preferences and object storage
code I recently came up with.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
7e83108c6a ocarina: Show attrs for song loaded on startup
I was annoyed that this wasn't happening.
2011-05-01 12:28:28 -04:00
Bryan Schumaker
a8421b8226 libsaria: Fix removing songs from queue
If I'm going to attempt to remove the song id from the queue whenever a
song song is loaded, I need to check if the song is in the queue before
trying to remove it.
2011-05-01 12:11:24 -04:00
Bryan Schumaker
f5eed60d78 ocarina: Play double clicked songs
Otherwise, what's the point of a gui?
2011-05-01 12:10:28 -04:00
Bryan Schumaker
9a1a0471c5 ocarina: Re-added queue
Once again, using Ocarina-5.0 concepts (such as hiding the tab when the
queue is  empty)
2011-05-01 12:09:47 -04:00
Bryan Schumaker
13a74e47c3 Ocarina: Remove from playlist
I can remove multiple songs from the playlist now.
2011-05-01 12:09:32 -04:00
Bryan Schumaker
bcd42cfea4 Ocarina: Add songs to playlist
Using a right click menu from the library
2011-05-01 12:09:09 -04:00
Bryan Schumaker
33b7f1ba0e Ocarina: Re-added playlist tab
The new tab uses my ocarina 5.0 concepts
2011-05-01 12:08:52 -04:00
Bryan Schumaker
f902c11f9a ocarina: Filter the library again
This time, I use concepts I played with for Ocarina 5.0
2011-05-01 12:07:56 -04:00
Bryan Schumaker
9c6db9ba9b ocarina: New listview code
I can fill in the listview from the library.
2011-05-01 12:07:23 -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
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
da99d4b349 Load xspf playlists
This patch adds loading of xspf playlists
2010-12-18 16:39:17 -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
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
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
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
Bryan Schumaker
25dcd0619c Added framework for Queue
This patch adds the queue as a tab on the main window.  I also added the
libsaria queue functions, but right now the don't do anything.
2010-12-12 13:46:49 -05:00
Bryan Schumaker
4a3e6184ab get_attrs uses list.append()
Appending to the list should be slightly faster than using +=
2010-12-11 21:54:36 -05:00
Bryan Schumaker
6957cc96f6 Clean up playlist
Removed extra spaces and old, commented out code
2010-12-09 08:11:31 -05:00
Bryan Schumaker
a233861cfd Playlist with generic init function
The playlist is now initialized using the generic init function.
2010-12-09 08:10:42 -05:00
Bryan Schumaker
9acd22b402 Library with generic init function
The library is now initialized with the generic init function.
2010-12-09 08:09:37 -05:00
Bryan Schumaker
9785796642 Add generic init function
The generic init function will start a new thread and call the user
given init function with the user given callback function.
2010-12-09 08:07:53 -05:00
Bryan Schumaker
47927bf9d3 File source attrs added
I added length and year attributes
2010-12-08 07:59:20 -05:00
Bryan Schumaker
5fc2628160 Add file source
The file source is used to play and get attributes for files on disk
that the user wants us to play.
2010-12-07 20:46:42 -05:00
Bryan Schumaker
e2fa7fff78 Don't have named sources
I don't use the named of each source any more.  It can be removed.
2010-12-07 20:45:30 -05:00
Bryan Schumaker
4af08350e2 cur_source no longer a string
It is now a pointer to the current source instance for faster access (no
dictionary lookup needed)
2010-12-07 20:10:33 -05:00
Bryan Schumaker
1089b85e88 Get_attrs current source
The generic get_attrs() function now works correctly.  I had to
introduce a "get_cur_id()" function for each source to get this working.
2010-12-07 08:07:10 -05:00
Bryan Schumaker
9cef85a0e9 Remove play_selected_id
Nothing uses this function so it should be removed
2010-12-05 17:16:04 -05:00