Commit Graph

1135 Commits

Author SHA1 Message Date
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
32e417e4b5 Remove the pause_after.py plugin
Pause after current song is now a built-in feature, so I don't need a
plugin too.
2010-12-17 23:02:35 -05:00
Bryan Schumaker
14a960372b Add pause after current song menu item 2010-12-17 23:02:16 -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
d380d0ec45 Use built-in selected_foreach
I also made a wrapper so I can do things with each selected ID.
2010-12-17 08:18:33 -05:00
Bryan Schumaker
23e93ee7ae Reorder shortcuts
If they are in arranged alphabetically the code is easier to read...
2010-12-17 08:09:02 -05:00
Bryan Schumaker
77130b0251 Added more shortcuts
I can now switch between the full and compact footer.  I can also goto
the current song.
2010-12-17 08:06:54 -05:00
Bryan Schumaker
07272cf65e Remove the timeout add function pointer
This is no longer needed for the filter entry, so I'll remove it
2010-12-16 22:42:07 -05:00
Bryan Schumaker
c2e7b1bc31 Escape key focuses nothing
Pressing the escape key will no longer focus the tabs, but instead will
focus nothing.  I think this is better visually.
2010-12-16 22:33:50 -05:00
Bryan Schumaker
10eafb61b5 Improved shortcut behavior
When we successfully execute a shortcut, we shouldn't let anything else
happen in the event path.  Therefore, I stop the key-press-event if it
is successfully handled.

This patch also adds shortcuts for seeking during playback.
2010-12-16 22:16:39 -05:00
Bryan Schumaker
f5e21df148 Button seeking controls
The gui seeking buttons should use the controls seeking functions,
rather than seeking through the audio layer directly.
2010-12-16 22:09: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
d45ea464ef Use a better shortcut system
The gtk.Entry() approach wasn't working.  My new way allows me to catch
keypresses directly from the window, rather than waiting for an entry to
change.
2010-12-16 22:02:34 -05:00
Bryan Schumaker
29665add24 Prevent gtk warning on startup
I need to check if the Source() has height 0 before scrolling.  A better
solution is to scroll when everything becomes visible, but I don't want
to figure that out right now... :P
2010-12-16 21:54:19 -05:00
Bryan Schumaker
243eb63f8a Don't keep saving window size
If the window size hasn't changed, we should not keep setting it.
2010-12-16 11:03:09 -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
21083ab1f7 Hide filter entry by default 2010-12-15 22:29:31 -05:00
Bryan Schumaker
9d08c5ce36 Added basic keyboard shortcuts
This patch adds an entry for keyboard shortcuts.  Right now, I only
support play/pause, stop and next.  I eventually plan to add more,
though.
2010-12-15 22:28:07 -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
add6a61c30 Add body_box
The body_box is a vbox containing the main tabs (for now).  This will
soon be used for a keyboard shortcut entry, too.
2010-12-15 21:57:01 -05:00
Bryan Schumaker
aa8f7d6188 Remove filter delay
I don't think I need this anymore ... filtering still feels fast without
it.
2010-12-15 09:32:52 -05:00
Bryan Schumaker
c0a27fb02c Move update library button
I moved it to the other side of the clear button so that it's farther
away from the goto button.
2010-12-15 08:00:13 -05:00
Bryan Schumaker
ee53d76238 Added a comment 2010-12-14 22:53:29 -05:00
Bryan Schumaker
d57db55d46 Don't scroll if Source widget not realized
This was giving a gtk warning, and is fairly easy to check for.
2010-12-14 22:44:39 -05:00
Bryan Schumaker
bcc622f06c Scroll to middle
When scrolling on song change, it looks better if we go to the middle
rather than somewhere near the top.
2010-12-14 22:39:58 -05:00
Bryan Schumaker
5a17c9c76f Added button tooltips
This patch adds tooltips to ALL gui buttons
2010-12-14 21:34:26 -05:00
Bryan Schumaker
f74239a0e2 Add update button
When clicked, the entire library will be updated in the background.
2010-12-14 20:37:40 -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
ed9d853065 Added notify plugin
This plugin will display a notification when the song is changed.
2010-12-12 16:47:42 -05:00
Bryan Schumaker
5b555b841f Album art in footer bar
I now draw a small version of the album art in the footer bar.
2010-12-12 15:45:42 -05:00
Bryan Schumaker
8bd3ca0ffa Custom album art size
The size of the album art is now a parameter passed on construction.
The default is 64.
2010-12-12 15:42:20 -05:00
Bryan Schumaker
14f4cccb87 Don't hide AlbumArtImage()
The AlbumArtImage() was alwas hidden at first.  I don't think we need
this...
2010-12-12 15:40:49 -05:00
Bryan Schumaker
5c0f30c544 Set footer based on single variable
For some reason I was using ocarina.footer.up and ocarina.footer.down to
track the status of the footer.  This should really only be tracked
using one boolean...
2010-12-12 15:38:16 -05:00
Bryan Schumaker
ce88872997 Initialize TimeLabel() to 00:00
This sets the inital value of a TimeLabel() to 00:00.  I found it
awkward to look at the inital time of a song as " / 03:55" or something
similar.  Now it will show "00:00 / 03:55"
2010-12-12 15:28:34 -05:00
Bryan Schumaker
cfd30e8eac Smaller header buttons
I can scale down the 6 sided die image better than the old 20 sided die,
so it is ok to make the header images smaller.
2010-12-12 15:21:46 -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