Anna Schumaker
9928c3239f
core/tags/album: Improve MusicBrainz query accuracy
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-15 09:37:54 -04:00
Anna Schumaker
eb5c0185e7
core/tags/album: Album art fetching improvements
...
- Allocate CaaCoverArt as needed, rather than sharing one object
- Use MusicBrainz fuzzy search to match more albums
- Escape most special characters in filenames
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-14 11:38:05 -04:00
Anna Schumaker
617088c89b
core/tags/album: Fix retrying MB5 query on error 503
...
Reusing the Mb5Query can have undesireable side effects, such as the
error code not getting reset between queries. Fix this by allocating a
new Mb5Query before evey request.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-14 11:38:05 -04:00
Anna Schumaker
e30f7f8115
core/tags/album: Add support for importing album artwork
...
This is needed so the user can manually set album artwork in the cases
where either we don't fetch the right image or no image is found.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-12 14:36:40 -04:00
Anna Schumaker
99b51f5257
core/tags/album: Make quotes around artist name configurable
...
This allows me to search for `"release" AND artist` but also `release
AND "artist"`
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-11 09:43:01 -04:00
Anna Schumaker
df3436f68a
core/tags/album: Search with quotes around artist instead of album name
...
I think this results in a slightly better search, although there are
still a few wrong images fetched.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-11 08:05:33 -04:00
Anna Schumaker
c8ccf7b844
core/tags/album: Place multiple queries to find artwork
...
If searching for artist and album fails, then fall back on album and
year or even just album name.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-04 21:30:06 -04:00
Anna Schumaker
b4218833c5
core/tags/album: Immediately retry query on 503 error
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-04 20:59:29 -04:00
Anna Schumaker
2ea5104d42
core/tags/album: Fetch album art in the same step as metadata
...
This will help prepare for running multiple queries to find a release.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-07-04 20:59:28 -04:00
Anna Schumaker
d0dddeacdb
core/tags/album: Add album_artwork_path() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker
940d2d1dc2
core/tags/album: Query the Cover Art Archive for album art
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker
570efda299
core/tags/album: Query MusicBrainz for album release information
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker
d79eb2c9b8
core/tags/album: Add album_artwork_exists() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker
0d9b7baff6
core/tags/album: Add a pointer to the struct artist
...
This is needed for album art fetching to get more accurate results for
our MusicBrainz query.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-24 10:50:37 -04:00
Anna Schumaker
4998b0867b
core/tags/track: Find the average play count of tracks
...
This function returns the average count of tracks that have been played,
and not the average count of all tracks.
Implements #29 : Efficiently calculate average play count of tracks
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:11:06 -04:00
Anna Schumaker
1973d15605
core/tags/track: Count the total number of tracks played
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:10:52 -04:00
Anna Schumaker
a97ec66e7f
core/tags/track: Count the number of unplayed tracks
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:10:47 -04:00
Anna Schumaker
9a209d098b
core/tags: Switch over to db_load_idle()
...
Load all tag databases with the new load function.
Implements #15 : Load track database through an idle task
Implements #16 : Load library database through an idle task
Implements #17 : Load genre database through an idle task
Implements #18 : Load artist database through an idle task
Implements #19 : Load album database through an idle task
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-06-14 17:07:55 -04:00
Anna Schumaker
2586348921
core/audio: Convert file to C
...
I also convert core/core.c so the audio test can be converted at the
same time.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-03-28 08:01:30 -04:00
Anna Schumaker
4e8a63cc36
core/tags/track: Expand track_compare() to compare by different fields
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-15 15:10:44 -05:00
Anna Schumaker
9a16a18b9f
core/tags/album: Add an album_compare_year() function
...
With special handling for albums with the same year but different names.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-15 15:10:44 -05:00
Anna Schumaker
f02853e9c7
core/containers: Move set into the containers/ directory
...
This patch also creates the containers/ directory
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-15 15:10:44 -05:00
Anna Schumaker
a5963a553e
core/tags/track: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
b5caf6faed
core/tags/track: Convert std::string to gchar *
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
9e3e3e514c
core/tags/track: Replace constructor with a backwards pointer
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
800aeda633
core/tags: Move tags_deinit() out of the tags namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
eb349c60e9
core/tags: Move tags_init() out of the tags namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
1b4eb470a7
core/tags/library: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
62fd782710
core/tags/library: Replace std::string with gchar *
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
5cc4efb6ac
core/tags/library: Replace constructor with a backwards pointer
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
2755e8a09b
core/tags/genre: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
6c3d708576
core/tags/genre: Replace std::string with gchar *
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
e98e74213e
core/tags/genre: Replace constructor with a backwards pointer
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
6d9c89392e
core/tags/artist: Convert file to C
2016-01-11 09:35:59 -05:00
Anna Schumaker
c07d1e9024
core/tags/artist: Replace std:string with gchar *
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
d404579297
core/tags/artist: Replace constructor with a backwards pointer
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
5309ea5931
core/tags/album: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
ad48d24533
core/tags/album: Replace std::string with gchar *
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
7c3bba11b5
core/tags/album: Replace constructor with a backwards pointer
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
cfd8ca8d43
core/filter: Convert file to C
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
90afcd6065
core/filter: Move filter_add() out of the filter namespace
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
746c55ac56
core/database: Change db_insert() to insert-by-key
...
This means that databases completely manage when memory is allocated.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
bd1de2262d
core/tags/track: Wire up the dbe_alloc() database operation
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2016-01-11 09:35:59 -05:00
Anna Schumaker
1c22ecfda4
core/database: De-templatize the database
...
We now have an interface for controlling everything through struct
db_entry, so let's just have the database store a db_entry directly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
1bef380ba7
core/database: Introduce the dbe_key() database operation
...
And store the result in the db_entry struct for use later.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
f51852f62e
core/database: Introduce the dbe_write() database operation
...
For writing database entries to disk.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
2da33f1c75
core/database: Introduce the dbe_read() database operation
...
This function allocates and returns a new database entry using
information read from a file.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
c77ca65630
core/database: Introduce the dbe_setup() database operation
...
Track tags need to add themselves to the filter index and update the
library track count once added to the database.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
c8021639ba
core/database: Introduce the dbe_free() database operation
...
The Track tag needs to do some cleanup when removed from a database, so
we need to use this op when removing items.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00
Anna Schumaker
049156a523
core/database: Introduce the dbe_alloc() database operation
...
For allocating new database items from a given key. Tracks do not need
this function since we have special handling for creation and insertion.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-12-10 16:48:18 -05:00