Commit Graph

1703 Commits

Author SHA1 Message Date
Bryan Schumaker
62c3ef2684 build: Create ocarina.bin as a symlink to ocarina-player
I want to add in more ocarina-* commands, so the first step is making
the player its own command.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 17:37:25 -04:00
Bryan Schumaker
30375bbdff build: Compile libsaria using an Sconscript file
To extract libsaria-related stuff from the main build script.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 10:40:19 -04:00
Bryan Schumaker
cc32587917 build: Create an ocarina Sconscript file
This file will set up building the ocarina/ subdirectory.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 10:36:45 -04:00
Bryan Schumaker
5f5f23bf9e Build: Create version.h using an Sconscript file
This lets me pull code out of the generic Sconstruct, so it can't be
bad!  I also removed the test directory since I never made unit tests.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 10:23:47 -04:00
Bryan Schumaker
3d722f364d Honor banned tracks when enabling a library path
Before this I was always putting them into the Library playlist.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-26 19:47:30 -04:00
Bryan Schumaker
4afce6300c Turn off library paths
I set the "visible" field to "false" and then remove each track from the
library playlist.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-23 07:48:10 -04:00
Bryan Schumaker
f5181c50b1 libsaria: Fix deck::prev()
Having tracks add themselves to the recent playlist means that it also
adds itself when going backwards through the playlist, resetting the
cur iterator and causing the same 2 songs to be played.  To get around
this, I gave tracks a new load_unlisted() function to load without
adding themselves to the recently played list.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 20:48:25 -04:00
Bryan Schumaker
ce6782558d libsaria: Bugfix Track playlist list
I was sometimes trying to remove a playlist from an invalid pointer.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 20:32:08 -04:00
Bryan Schumaker
057bce8809 Show last played date on each playlist tab
I like to know when I last listened to a song.

Signed-off-by: Bryan Schumaker <bjchuma@gmail.com>
2012-05-19 20:09:21 -04:00
Bryan Schumaker
ca9f3e6cf9 Show the play count in the playlist renderer
I created a new renderer function for updating tracks when they change.
Using this, I can show the new playcount of tracks as it is incremented.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 19:47:11 -04:00
Bryan Schumaker
61769f74fd libsaria: Keep a pointer to each playlist a Track is on
Useful for removing them later without having to check every playlist.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 19:01:55 -04:00
Bryan Schumaker
e874345596 ocarina: Ban and unban songs using delete key
Banning: Use the delete key on selected tracks from the library tab.
Unbanning: Use the delete key on selected tracks from the banned tab.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 18:48:08 -04:00
Bryan Schumaker
01b5eeb10f ocarina: Make "add to playlist" menu items
These menu items add tracks to a specific playlist instead of creating a
new one.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 18:35:05 -04:00
Bryan Schumaker
77225d4d9f libsaria: Define MAX_PLAYLISTS in a header file
So applications can use this value too.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 18:34:30 -04:00
Bryan Schumaker
0e6632ce45 ocarina: Use yes / no images for banning songs
I think this makes more sense than using the GTK_STOCK_DIALOG_ERROR for
both states.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 12:17:45 -04:00
Bryan Schumaker
dea787d576 ocarina: Disable tab label text when playlists are disabled
To make it more obvious which playlists are disabled when you are on
other tabs.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 12:11:19 -04:00
Bryan Schumaker
d74d008223 ocarina: Change disable playlist button image
I do this whenever the playlist disabled flag changes.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 12:05:03 -04:00
Bryan Schumaker
706f07b6f7 ocarina: Disable playlist widgets with a playlist
To emphasize that the playlist has been disabled.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 11:57:28 -04:00
Bryan Schumaker
973b5d3d31 Save playlist disabled status to file
This allows me to restore it when restarting ocarina.  I also need to
notify the renderer that the playlist status has changed so I can change
the button state.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 11:51:52 -04:00
Bryan Schumaker
35d71efe58 Disable temporary playlists
When a playlist is disabled I won't pick songs from it until the user
re-enables it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 11:25:51 -04:00
Bryan Schumaker
f6cdcae79c ocarina: Create a make_toggle_button_data() function
Used to pass extra data to the toggle function.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 11:24:38 -04:00
Bryan Schumaker
01e63da4f7 ocarina: Don't show playlist tabs immediately
Instead, I want to show them when they have tracks added to them.  This
keeps the banned tab from being shown and then hidden right away during
startup.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 10:46:38 -04:00
Bryan Schumaker
376fe67115 ocarina: Bugfix the ban button
- Use g_signal_connect() when creating toggle buttons
- Only set the banned state on a track if it has changed

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 10:39:26 -04:00
Bryan Schumaker
ed33881a25 ocarina: Created a shortcut for switching to the banned list
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-17 13:31:02 -04:00
Bryan Schumaker
bd171423a6 ocarina: Hide empty playlists
If the playlist size == 0, then we don't need to show it.  This hides
the banned list when it doesn't contain any songs.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-17 13:28:55 -04:00
Bryan Schumaker
ed5574f612 libsaria: Start banned songs on the banned playlist
Instead of putting them on the library playlist.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-17 13:21:26 -04:00
Bryan Schumaker
4718bf77f3 Change playlists when the ban button is pressed
I remove the track from the library playlist and add it to the banned
list.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-17 13:15:36 -04:00
Bryan Schumaker
bb7a662f92 Ban songs in the library
Right now, this just toggles the "banned" field in the Track class and
then skips to the next track.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-17 13:00:03 -04:00
Bryan Schumaker
e8e8589614 libsaria: Add a new field to the Track class
I plan on using this to track if the user has banned a track or not.
This patch introduces the new field and handles the library version
upgrade.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-17 12:30:11 -04:00
Bryan Schumaker
ea7b66ae6d libsaria: Read file from pipe
Scripts should write commands to a temporary file and then write the
path to that file to the application pipe.  I can then write results of
the command to this file before exiting.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-17 11:51:36 -04:00
Bryan Schumaker
a7570cc80a ocarina: Tell gtk to look for data coming in over the pipe
This gives me a chance to read it without needing to poll for changes.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-15 11:33:29 -04:00
Bryan Schumaker
8f1de2745e libsaria: Create functions for opening and closing pipes
I'm going to use the pipe with shell scripts for remote-controlling
ocarina (possibly through a web interface).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-15 11:23:47 -04:00
Bryan Schumaker
463cef95dd libsaria: Create an initdata struct for initializing
Passing individual variables through works for a small number of
variables, but passing a struct makes it easier to add new arguments.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-15 11:06:43 -04:00
Bryan Schumaker
d0f6996403 libsaria: Remove the list_recent field from tracks
I think it's easier to check if the track has an associated library
path.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-15 10:49:56 -04:00
Bryan Schumaker
d7166f3cab libsaria: Track the last played date
When we mark a song as played we should also mark that it was last
played today.  With this, I think I'm finally using all my library path
fields!

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-15 10:44:25 -04:00
Bryan Schumaker
34cd70fa39 libsaria: Track play count
I've had a library field for this for a while, but I haven't been using
it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-15 10:29:26 -04:00
Bryan Schumaker
36bd2c2b66 Reorder playlists in the playlist deck
This allows me to change playback order without having to delete old
playlists and make new ones.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-14 11:21:10 -04:00
Bryan Schumaker
874f999adf ocarina: Close button modifications
- Set relief to none
- Remove the inner-border to make the button smaller

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-14 10:30:23 -04:00
Bryan Schumaker
2dd1e362d1 Created a "delete playlist" button
On the libsaria side, I created a function for finding and deleting a
playlist pointer.  On the ocarina side, I added a button to each
playlist tab to remove the tab.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-13 13:48:22 -04:00
Bryan Schumaker
d03e38ffbb ocarina: Add a make_button_data() function
Used for passing extra data through the button clicked callback.  I also
use this patch to remove the extra GdkEvent argument passed to buttons,
since this argument isn't actually part of the callback...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-13 13:36:42 -04:00
Bryan Schumaker
5363cfac82 libsaria: Garbage collect the playlist deck
I do this after choosing the next song and after tracks are removed from
each playlist.  This allows me to remove playlists as they empty.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-13 12:09:39 -04:00
Bryan Schumaker
8309c4a606 libsaria: Remove undefined function
I used in a while ago, but it's been removed (but not from the header file).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-13 11:35:39 -04:00
Bryan Schumaker
4fe9e667f7 libsaria: Almost always add track to the recent list
Before I was only adding tracks that were picked through the
deck::next() function.  Now I have the track add itself to the recent
list (except when I'm playing an outside track).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-13 11:26:23 -04:00
Bryan Schumaker
3b5af7b865 libsaria: Remove tracks from index
Basically the same way they are inserted, only call a "remove" function.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-13 11:18:40 -04:00
Bryan Schumaker
c3ba90f900 libsaria: Tell tracks if they should play when loaded
This should set the gst pipeline to the correct state when the song is
loaded, rather than pausing after telling it to play.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-13 11:07:00 -04:00
Bryan Schumaker
7dab47783b libsaria: Remove unused find_nth_playlist() function
I improve get_playlist() instead

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-13 10:49:40 -04:00
Bryan Schumaker
7f52d81d12 libsaria: Don't store the library in the playlist deck
This makes some of the deck code easier, since I don't need to check for
static playlists anymore.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-13 10:46:32 -04:00
Bryan Schumaker
5b86536af3 Begin Ocarina 5.9 2012-05-13 10:46:17 -04:00
Bryan Schumaker
243a885713 Update PKGBUILD for 5.8
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-12 08:06:27 -04:00
Bryan Schumaker
cf85c0231d Ocarina 5.8 2012-05-12 08:06:02 -04:00