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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
I want to manage this container on my own, rather than relying on the
generic index code. This will eventually make it easier to store a
playlist as a queue, instead of a set.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This flag is used for bulk inserts to cut down on the number of gui
operations during startup. Let's just make it standard that unsetting
the flag causes the queue to resort itself.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>