Commit Graph

3385 Commits

Author SHA1 Message Date
Anna Schumaker e578e0e6dd Ocarina 6.4.17-rc
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-29 17:09:39 -04:00
Anna Schumaker 34447007f9 core/history: Remove unused queue
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:09:38 -04:00
Anna Schumaker 5a54fb69b6 core/collection: Remove unused queue
And remove collection_ops from the core initdata

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:09:33 -04:00
Anna Schumaker dc07d637f6 gui/history: Remove unused gui queue code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:06 -04:00
Anna Schumaker 64fc5a9a0d gui/collection: Remove unused gui queue code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:06 -04:00
Anna Schumaker 15ed068e13 gui/playlist: Select Collection playlist during startup
This preserves the original behavior, where the collection is always
selected from the beginning.  This can be improved upon later, once
queued tracks are implemented as a playlist.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-29 17:06:06 -04:00
Anna Schumaker 696173b03e gui/playlist: Add Collection and History playlists to the sidebar
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:06 -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 efae58c356 core/playlists/system: Add history playlist
Implements #8: Convert history queue into a playlist
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:04 -04:00
Anna Schumaker 6265b937c7 core/playlists/system: Add collection playlist
Implements #7: Convert collection queue into a playlist
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:03 -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 62123eb025 core/playlists: Add struct playlist
Containing the playlist name and queue.  I pass this to the gui through
the queue_init() function.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:03 -04:00
Anna Schumaker 44a57ed863 core/queue: Add extra paramater to queue_init()
This is used to pass through a value to the GUI during queue
initialization.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:03 -04:00
Anna Schumaker 7f0e1ecc99 core/queue: Add queue_{save, load}_flags() function
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:03 -04:00
Anna Schumaker 92a53d90b4 core/database: Move database out of containers/ subdirectory
It doesn't make sense to have a subdirectory with a single file.  Let's
move it back to core/

Implements #45: Move database into core/
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:01 -04:00
Anna Schumaker fa0dee5921 core/containers: Remove unused set class
Implements #48: Remove set code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:06:00 -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 93fb40360d core/filter: filter_search() returns a new GHashTable
I think this is cleaner than having an upper layer allocate the results
set manually.  This also lets me return NULL in the case that there were
no results.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:05:59 -04:00
Anna Schumaker fda3f761a0 core/filter: Call GHashTable functions directly
Implements #43: Filter code can use a GHashTable directly
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:05:54 -04:00
Anna Schumaker 63b46b6161 core/filter: Implement copy and intersect directly
I intend to remove the set class, so we still need a way to handle
filter results.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:05:54 -04:00
Anna Schumaker 29b2b6f6f4 core/filter: Store track pointers directly
I was storing database indexes, but this assumes that database indexes
are constant.  I intend to change this with database defragmentation.

Implements #46: Filter stores a track pointer
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 17:05:47 -04:00
Anna Schumaker 415bd9731a core/filter: Add filter_remove()
This is used to remove tracks from the filtering index.  We'll need this
once we switch over to storing pointers to keep the same track from
getting added multiple times.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 15:46:11 -04:00
Anna Schumaker 04a175d3e3 core/filter: Switch from using Index to a GHashTable
This is more straightforward than using my custom index code without
adding too much work.

Implements #43: Filter code can use a GHashTable directly
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 15:46:11 -04:00
Anna Schumaker ee4bbacf81 core/containers/set: Add set_alloc() and set_free() functions
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-29 15:46:11 -04:00
Anna Schumaker da3dd60ef3 Ocarina 6.4.16
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-29 15:41:05 -04:00
Anna Schumaker 951624c82f core/audio: Update Most and Least Played playlists
We need to do this when tracks are played to keep playlist counts
accurate.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-29 10:14:35 -04:00
Anna Schumaker 17910c72b2 tests: Add extra underscore to placeholder callback function
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-28 16:53:18 -04:00
Anna Schumaker 779969f28b core/idle: Let tests run without the thread pool
The thread pool is used to fetch album art in the background, but this
can slow down most tests that aren't interested in album art.  Adding a
(testing-only) function for running without the thread pool speeds
things up a bit.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-28 16:17:43 -04:00
Anna Schumaker bd8f3754e7 CHANGELOG updates
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-28 09:17:11 -04:00
Anna Schumaker 1d1e41916a core/playlists/system: Check that we read a valid playlist name
Otherwise we could crash when we try to access an out of bounds area of
the playlist array.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-28 08:55:53 -04:00
Anna Schumaker 3098282382 gui/artwork: Don't destroy objects twice
The file filter and preview widget are both cleaned up when the file
chooser dialog is destroyed.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-27 10:51:59 -04:00
Anna Schumaker 3b62125135 gui/artwork: Show hidden folders when selecting new images
Sometimes Ocarina gets the correct image for CD1, but not for CD2.
Allow traversing into hidden folders so users can select the correct
image out of the artwork cache.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-27 10:51:42 -04:00
Anna Schumaker 4de869d691 gui/artwork: Clear __artwork_cur_album when selecting album art
Otherwise the new image will never be updated due to the "did the album
change?" check in __artwork_set_pixbuf()

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-27 10:48:13 -04:00
Anna Schumaker 160295a6cc gui/artwork: Add a preview widget to the file chooser dialog
This lets users actually see images before selecting them for ablum art.

Implements #59: Add preview widget to album art chooser
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-27 10:45:59 -04:00
Anna Schumaker 343dec5d8d gui/artwork: Fix blurry album art
Using gdk_pixbuf_new_from_file_at_scale() can result in a blurry image
due to something in the gdk backend.  I want to have a sharper image, so
we need to perform the scale manually through Cairo.

Fixes issue #60: Album art is blurry
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-25 10:00:09 -04:00
Anna Schumaker 7dff5412bc gui/artwork: Reduce time spent polling for artwork
Since MusicBrainz limits us to one request each second, it doesn't
really make sense to poll for new artwork every half second.  Instead,
let's just put this into a new timeout function that gets called every
two seconds.  This should also let us stop polling once artwork has been
found.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-22 09:40:03 -04:00
Anna Schumaker 83724c5f6f gui/artwork: Split out album art functions into a new file
I think this is cleaner, and it should make it easier to maintain this
code.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-22 09:40:03 -04:00
Anna Schumaker 8893cdb58b tests: Unit test fixes
These should have been included as part of 6.4.15.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-22 09:40:02 -04:00
Anna Schumaker c5a563c112 Fix PKGBUILD dependency
We depend on the libmusicbrainz5 library, not libmusicbrainz.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-19 17:02:13 -04:00
Anna Schumaker 6ab5d99d71 Ocarina 6.4.16-rc
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2016-07-19 17:01:02 -04:00
Anna Schumaker e24ab97545 gui/playlist: Add size information to playlist sidebar
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:11 -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 90e0b3ed78 core/playlist: Remove remaining dynamic playlist code
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:11 -04:00
Anna Schumaker 2ff7113668 core/playlists/system: Move the least played playlist into system.c
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:10 -04:00
Anna Schumaker 9d3cc2e5ab core/playlists/system: Move the most played playlist into system.c
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:09 -04:00
Anna Schumaker 5ab2e63734 core/playlists/system: Move the unplayed tracks playlist into system.c
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-19 16:03:06 -04:00