diff options
author | Martyn Russell <martyn@lanedo.com> | 2014-07-28 22:12:01 +0200 |
---|---|---|
committer | Martyn Russell <martyn@lanedo.com> | 2014-07-28 22:12:01 +0200 |
commit | b3f7fd032e2fb7a1bb6a13c7fd0cf60b500639e2 (patch) | |
tree | fb807a49faa8d15e44eaa23a7e1a3d307bd4c14c | |
parent | 1e32878442fac139c79c56cea1bca5fd4fb3e0ed (diff) | |
download | libmediaart-b3f7fd032e2fb7a1bb6a13c7fd0cf60b500639e2.tar.gz |
extract: Fixed process_buffer() len check (was inverted) and artist/title
-rw-r--r-- | libmediaart/extract.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmediaart/extract.c b/libmediaart/extract.c index 7091aac..692a3ee 100644 --- a/libmediaart/extract.c +++ b/libmediaart/extract.c @@ -1507,6 +1507,8 @@ get_heuristic_for_parent_path (GFile *file, * @buffer, the image data will be converted to the correct format and * saved in the media art cache. * + * Either @artist OR @title can be %NULL, but they can not both be %NULL. + * * If @file is on a removable filesystem, the media art file will be saved in a * cache on the removable file system rather than on the host machine. * @@ -1536,7 +1538,8 @@ media_art_process_buffer (MediaArtProcess *process, g_return_val_if_fail (type > MEDIA_ART_NONE && type < MEDIA_ART_TYPE_COUNT, FALSE); g_return_val_if_fail (G_IS_FILE (related_file), FALSE); g_return_val_if_fail (buffer != NULL, FALSE); - g_return_val_if_fail (len < 0, FALSE); + g_return_val_if_fail (len > 0, FALSE); + g_return_val_if_fail (artist != NULL || title != NULL, FALSE); processed = created = FALSE; |