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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>