Commit Graph

23 Commits

Author SHA1 Message Date
Bryan Schumaker
aa9f517959 Walk filtered IDs
We already have a function for walking all song ids.  Collections should
be able to walk the filtered IDs too.
2010-10-31 17:20:20 -04:00
Bryan Schumaker
b000bbf808 Basic playlist deduplication
Before adding songs to the playlist, check if the playlist already
contains the song id.
2010-10-28 08:30:46 -04:00
Bryan Schumaker
50f7e1203d Score system
The score system will help determine what users do and don't like.  When
the user chooses a song or listens to > 75% of a song, we increment the
score.  If the user selects a different song in the first 1/3 of
playback then we decrement the score.

Songs with a score >= 0 will always be played.  Songs with a score < 0
have a 50% chance of playing.
2010-10-21 17:11:33 -04:00
Bryan Schumaker
6d7b08f921 Random
- Made a random check button to toggle the random preference
- Playlists pick a random song from what is visible
2010-10-21 08:47:10 -04:00
Bryan Schumaker
dc1b6dd4a6 Playlists
I can add songs to a playlist and populate the playlist afterwards (and
on startup).
2010-10-20 21:53:47 -04:00
Bryan Schumaker
48d0af571c Collection filtering
I moved filtering from the Library lens to the collection base class
2010-10-20 20:21:11 -04:00
Bryan Schumaker
9caa247d04 Collection.find_id(): Check if the result is false. If it is, return
None.  Otherwise, return result[0]
2010-10-20 07:59:08 -04:00
Bryan Schumaker
b45117e761 Don't return list[0] when having the library look up an id 2010-10-19 22:30:57 -04:00
Bryan Schumaker
1da55341d4 Fixed loading of random songs
I fixed loading of songs not in the library by correctly implementing
the path walk function in the DLTree class
2010-10-15 23:12:33 -04:00
Bryan Schumaker
45e2b0325f Filtering improvements
When a list is filtered, if the Nth song is selected we should play song
N in the filtered list and not the original list.
2010-10-14 08:16:13 -04:00
Bryan Schumaker
6934974d75 Time strings
During scanning I convert the length into a time string ( "h:mm:ss" ).
This is drawn in the gui when a collection list is populated.
2010-10-11 18:22:05 -04:00
Bryan Schumaker
168025fb60 Collection Indexing
I can now add songs to a collection's index.  The index only works for
unicode string right now (all others must be converted)
2010-10-10 13:45:52 -04:00
Bryan Schumaker
2c27185679 Use new collection structure to populate the library list. 2010-10-08 13:09:42 -04:00
Bryan Schumaker
adcb73dac9 Have a working doubly-linked tree based library.
I have a bit more to do before I support everything the old library did.
Mostly getattr work.
2010-10-06 23:31:36 -04:00
Bryan Schumaker
ab29b2cb2b More work with collections based on doubly linked trees 2010-10-03 19:00:06 -04:00
Bryan Schumaker
31b470e597 Track tags in another double linked tree. Create a record for each
track linking to each tree.  Create a library filter for creating a
library.
2010-10-01 21:33:19 -04:00
Bryan Schumaker
8221411ca2 Double linked trees
I have begun working on doubly-linked trees for use in collections.
2010-10-01 12:32:24 -04:00
Bryan Schumaker
8594c3b330 Collection get_attr() and list hover popup
Collections now have a get_attr function.  This function takes a song id
and a string with the requested attribute.  The value of the attribute
is returned.  This is used for generating a hover popup with the
playcount.
2010-08-20 19:37:55 -04:00
Bryan Schumaker
304855c10d Use gtk.ListStore.insert
The append function of a ListStore is extremely slow.  Now I use  the
ListStore insert function, and manually track the size of the list
myself.
2010-08-20 08:27:12 -04:00
Bryan Schumaker
15cc5d22f0 Backend and frontend changes
Libsaria events now support starting specific callback functions in a
background thread.  This replaces starting a specific event in the
background.

I have a library tab that is added to the main window through use of the
ocarina.add_tab function.

I have new tests for walking the tree and running multiple threads with
locks.
2010-08-19 23:02:30 -04:00
Bryan Schumaker
d8cadb83e9 Collection Tree
I have implemented a tree to store store information about each track.
I now support tracks that have the same artist, album, and title.
2010-08-12 22:11:13 -04:00
Bryan Schumaker
71b3289f62 Improved collection indexing
I can now create an index over an entire collection faster.  The
bottleneck is still disk accesses, but I still think this was a good
challenge.
2010-08-12 08:27:21 -04:00
Bryan Schumaker
52b1236b29 Collection work
I've begun work on a generic collection class for the library, playlist,
and queue.  Tagpy functions have been merged into the
libsaria.collections.__init__.py file to make things easier.
2010-08-08 14:30:15 -04:00