Commit Graph

1655 Commits

Author SHA1 Message Date
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
Bryan Schumaker 574e1062fa libsaria: Use lstat for listing directories
Now I work on JFS in addition to other filesystems...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-11 17:52:48 -04:00
Bryan Schumaker c3bb6119e5 libsaria: More next() tuning
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-07 08:11:11 -04:00
Bryan Schumaker c0fdcb4d93 libsaria: Improve playlist iterator handling
To prevent segfaults

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-07 08:09:45 -04:00
Bryan Schumaker b04aaf3815 libsaria: Restore last song on startup
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-07 08:08:23 -04:00
Bryan Schumaker a8c6aabff7 libsaria: Return new current index from rm_index()
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-14 11:36:29 -04:00
Bryan Schumaker c2c13b2cbc libsaria: Create a single add_tracks() function
Derived classes need to implement a do_add_tracks() function instead so
I have a single place to notify the renderer and save the playlist.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-14 11:16:15 -04:00
Bryan Schumaker 18e0daeb17 ocarina: Remove more commented out and disabled code
- The old header functions
- The old callback header file
- The old shortcut registering system
- The old main() code

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-13 08:22:44 -04:00
Bryan Schumaker 3b705515c2 ocarina: Remove old songlist code
I've been wanting to do this for a long time.  I don't think I need it
anymore, so it can all be safely removed.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-13 08:19:20 -04:00
Bryan Schumaker 45c839c04a libsaria: Improve random_next()
Limiting rand to plist.size() * (3 / 4) kept causing songs at the end of
the range to get selected.  This caused a backwards-scrolling effect as
songs were played.  Instead, I want to pick from the next half of the
list to create a forward-scrolling effect.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-13 08:08:07 -04:00
Bryan Schumaker 570374f53d libsaria: Go to new current iterator when picking next
The new "cur" iterator points to a valid song, so I might as well scroll
close to it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-13 08:06:36 -04:00
Bryan Schumaker 0cdd5eff0d libsaria: Remove diff reject file
Where did this come from?

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-13 08:05:40 -04:00
Bryan Schumaker 3287cde11e ocarina: Find selected indicies
Used for removing tracks from temporary playlists.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-13 08:05:01 -04:00
Bryan Schumaker 99757c47f9 libsaria: Remove tracks by index
Because otherwise removing a track will remove all duplicates, too.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-13 08:03:46 -04:00
Bryan Schumaker 900cac7e45 ocarina: Improve right click menu
I can now create new playlists at either the front or back of the
playlist deck.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-12 08:06:39 -04:00
Bryan Schumaker 97427af922 Create new playlists in front
The "S" or "Q" shortcut will create a new playlist on the front of the
deck, "s" or "q" creates a shortcut on the back of the deck.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-10 08:04:29 -04:00
Bryan Schumaker 898865293d libsaria: Change deck::push() to deck::push_back()
I'm going to create a push_front() function too, so renaming it makes
sense.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-10 07:57:14 -04:00
Bryan Schumaker 4c33ba82ec ocarina: Find keypad numbers
I needed to strip out the "KP_" at the beginning.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-09 08:07:35 -04:00
Bryan Schumaker 6f69392e5f ocarina: Use "N" for going to previous track
This matches the vim keybinding, which explains why I kept trying to use
it instead of "p"...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-09 08:02:16 -04:00
Bryan Schumaker b2c17bd54a libsaria: Create a get_playlist() function
I don't want to keep creating functions for doing things to playlists.
Instead, I'd rather just get the playlist directly.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-09 08:00:12 -04:00
Bryan Schumaker 851aa10ae1 libsaria: Create generic function for reading numbered directories
I create directories with numbered files for the library and playlist,
this patch creates generic code for reading them during startup.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 261316fb5f libsaria: Clean out header files
Remove things that aren't being used anymore.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker f487a08ac1 libsaria: Remove commented out code
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 0d05e14724 libsaria: Reload playlists on startup
I do this in another idle task, I also had to give the library a
function to find tracks based on (libid, trackid).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 60d2e4fcd8 libsaria: Save temporary playlists
I do this whenever the playlist changes (tracks added, removed or
playlist renumbered).  When playlists are deleted I remove the file.  I
also remove the file when new_number < cur_number.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 3f030872ba libsaria: Remove old controls.cpp file
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker da49c68e82 libsaria: Remove old index header
Not needed anymore.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 3caea974fe ocarina: Refilter the playlist
I don't change what can play as a result, but at least I can find songs
again!

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 235ac70033 libsaria: Move filter code
From index.cpp to filter.cpp.  I also added in an "is_visible()"
function for testing visibility of tracks.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 7820b28534 libsaria: Search the index
And notify the renderer to update

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 556aad3344 libsaria: Introduce bare Index class
Right now I just add and remove songs from the index as they are added
and removed from the playlist.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 2fb2f97a43 libsaria: Fix compile errors
g++ must have gotten updated...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:20 -04:00
Bryan Schumaker 8869b2aaed ocarina: Use pause_count
This allows me to say "pause in N songs" instead of limiting it pausing
only after the next song.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker dc57109d9e libsaria: Give access to pause_count
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker 9d271740aa ocarina: Added automatic pause controls
Right now I just pause after the current song, but I eventually plan on
adding controls to pause after N songs.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker 2cdfbde9be libsaria: Implement pause after N tracks
I keep a counter that is decremented after every call to next().  When
it reaches zero, pause after loading the next song.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker cb29bcba48 libsaria: Remove unused library file
I've re-implemented everything in this file, so it's time to remove it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker 3772bf78fa libsaria: Re-order code in update.cpp
Keep class functions with the class that uses them.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker d6b8044ad3 ocarina: Hit "Delete" to remove tracks from a specific playlist
Yay keyboard shortcuts!

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker 31ab70b37d libsaria: Remove tracks from a specific playlist
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker b6cf10bf61 ocarina: Update library path when row is activated
This can either be a double-click or pressing "enter" on a selected row.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker 659a2208b8 libsaria: Remove files that no longer exist
I scan a library path, do an lstat() and remove the files that can't be
found.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker a1819dd5f9 libsaria: Only add new files during a library scan
I simply check if the file is already in the library before tagging it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker 537dc3a22d ocarina: Support removing library paths
Use the "Delete" key for now.  I also added in using the plus key to add
new paths.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker 6e97f04e85 libsaria: Remove library paths
- Delete the library file
- Remove tracks from each playlist
- Notify the renderer that tracks have been removed
- Notify library drivers that the path has been removed
- Remove the path from the list

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker 97fcff5c18 ocarina: Smaller progress bar
I learned how to set custom gtk_rc styles to configure the idle task
progress bar.  Now that it's smaller, I also moved it to the very bottom
of the window.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker a33e1e6d8d ocarina: Use the playlist number
- Create new notebook page at number
- Show number to left of label

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker bc800057e0 libsaria: Expand on numbered playlists
- Renumber when new playlists are either added or removed
- Finding nth playlist is much easier now
- Insert new playlists right before the library

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00
Bryan Schumaker 4e046beb20 libsaria: Introduce playlist numbers
To track where in the deck they are.  Displaying and modifying them
comes next...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:19 -04:00