dcbf2dff72
core/playlists/user: Add support for user created playlists
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
f726b6994c
core/playlist: Add a function to force save playlists
...
This is needed to handle track database defragmentation, but could also
be expanded on later to save playlists from a generic place.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:35 -04:00
8985e70439
core/playlists: Add a playlist_select() function
...
I query the underlying playlist to see if it is selectable, and then
update the settings file if it is.
Implements #10 : Select default playlist
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:34 -04:00
bfcfaae977
core/playlists: Add functions for converting between names and ids
...
I need to have integer playlist ids to store into the settings database
once I allow changing the default playlist.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-09-26 08:07:34 -04:00
Anna Schumaker
9b7c45634c
tests: Build core/playlists/library test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
487274ff00
tests: Build core/playlists/artist test with ctest
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-09-23 16:11:02 -04:00
Anna Schumaker
c448db2665
core/playlists: Add playlist_{new, delete}() functions
...
System playlists cannot be created or deleted, so these functions simply
return false in this case. Library playlists will use this to add new
library paths to Ocarina.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker
03ed7c4b84
core/playlists/system: Add pl_system_new_track()
...
Called to tell system playlists that a new track has been added to the
database.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker
cfeca9ae4b
core/playlist: Add playlist_type enum
...
I'm going to use this to distinguish between various playlist types that
are about to be added. Let's update the playlist functions first, and
then add more types in a future patch.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-08-13 08:31:30 -04:00
Anna Schumaker
dfae74dd50
gui/playlist: Set gui queue name based on passed playlist
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:06 -04:00
Anna Schumaker
8eaf6506e8
core/playlist: Add playlist_{next, prev}() functions
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:06 -04:00
Anna Schumaker
5d4de9c5b0
core/playlist: Add playlist_sort() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:03 -04:00
Anna Schumaker
c7bc2062d2
core/playlist: Add playlist_{get,set}_random()
...
I'll need this to toggle the random flag for the Collection playlist to
avoid cycling through the GUI in order to save.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:03 -04:00
Anna Schumaker
98fe6d3bbb
core/containers: Remove unused index class
...
Implements #44 : Remove Index code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:05:59 -04:00
Anna Schumaker
2c18f9e715
core/playlist: Add playlist_size() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:11 -04:00
Anna Schumaker
00dd72d46e
core/playlist: Remove unused playlist_t enum
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:11 -04:00
Anna Schumaker
5e9b6bc975
core/playlist: Access playlists through a string
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:11 -04:00
Anna Schumaker
1527ee0e6d
core/playlist: Add playlist_update() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:06 -04:00
Anna Schumaker
a465577c86
core/playlists/system: Move system playlists into a new file
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:06 -04:00
Anna Schumaker
e3d4143565
core/playlist: Add new playlist_type struct
...
I intend to use this for creating playlists with different properties,
such as using the playlist interface to add library paths.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:06 -04:00
Anna Schumaker
151c446635
core/playlist: Use separate queues for favorite and hidden playlists
...
Implements issue #6 : Store playlists as queues
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:04 -04:00
Anna Schumaker
b3592e40c0
core/playlist: Rename PL_BANNED -> PL_HIDDEN
...
"Banning" a track is a bit harsh. Let's talking about hiding tracks
instead, so that it sounds friendlier.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-29 13:22:31 -05:00
Anna Schumaker
fef3ef3353
core: Initialize the playlist before the collection
...
I think it makes more sense to have the collection manage if banned
tracks are displayed or not, rather than doing this from the playlist
layer.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
3b5bbf14af
core/playlist: playlist_remove() can return a boolean
...
The collection will be using this soon to tell if a track was
successfully unbanned.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
20825613e9
core/playlist: playlist_add() can return a boolean
...
There is at least one place in the gui where it needs to know if a track
was actually added to a playlist. Adding a return value is the best way
to know what happened.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
02c82c182e
core/playlist: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
b7a4bb3872
core/playlist: Use playlist_t enum to access playlists
...
Using strings is pretty tedious, so let's restrict restrict playlist
access to known values.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
88f6fc526c
core/playlist: Add a function to remove banned tracks
...
This replaces the get_tracks() function.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
4e6028cf6e
core/playlist: Move playlist_remove() out of the playlist namespace
...
I also remove redundant unit tests.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
0e3d6251d3
core/playlist: Move playlist_add() out of the playlist namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
82ed2f2dc0
core/playlist: Move playlist_get_queue() out of the playlist namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
6f0b95608a
core/playlist: Move playlist_select() out of the playlist namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
1d3a762936
core/playlist: Move playlist_has() out of the playlist namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
1f5ce9e0d1
core/playlist: Add playlist_deinit() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
b1c5d42387
core/playlist: Move playlist_init() out of the playlist namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-02-26 11:04:42 -05:00
Anna Schumaker
0b84b6180c
core/queue: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
df06b444cf
core/queue: Replace on_track_added() with qop_added()
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
281947aded
core/queue: Convert from class to struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-29 08:22:10 -05:00
Anna Schumaker
58a983efd1
core/containers: Move index into the containers/ directory
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-15 15:10:44 -05:00
Anna Schumaker
55a688cdcc
core/index: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:19 -05:00
Anna Schumaker
765079df94
core/tags/track: Convert Track class into a struct
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
a91326551f
core/index: Convert IndexEntry class to a struct
...
In addition, I added the prefix "ie_" to all member names.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:41:33 -05:00
Anna Schumaker
ead1397b31
Remove Doxygen tags
...
I wasn't actually using Doxygen for anything, so it's probably best just
to remove it.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
9cbff6e9a1
Playlist: Update doxygen documentation
...
I also remove the playlist section of the DESIGN document.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-11 08:23:08 -05:00
Anna Schumaker
73264e04ce
playlist: Add doxygen comments.
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-15 08:27:03 -04:00
Anna Schumaker
9ea0fd4f29
core: Update include file #ifndef guards
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-21 09:49:07 -04:00
Anna Schumaker
95064e4537
Rename lib/ -> core/
...
I plan to introduce a new lib/ that sits between the gui and the backend
files (similar to how glibc sits between the kernel and userspace).
This gets the rename out of the way before I change my mind again.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-05 10:21:32 -04:00