summaryrefslogtreecommitdiff
path: root/libmediaart/cache.c
Commit message (Collapse)AuthorAgeFilesLines
* Mandate that inputs are valid UTF8Sam Thursfield2020-12-271-0/+17
| | | | | | | | | | | | | This restriction was already in place, since we passed the inputs directly to GLib functions that expect valid UTF8. If this library were widely used then we might proactively validate inputs to protect against exploits. At time of writing, this module is only used in 3 places (grilo-plugins, gnome-music and rygel), so just check they are doing the right thing when calling the API. See https://gitlab.gnome.org/GNOME/libmediaart/-/merge_requests/5 for background.
* Rationalize NULL/empty string handling in media_art_strip_invalid_entities()Sam Thursfield2020-12-271-3/+14
| | | | | | | | | | | We return NULL if input is NULL and a newly allocated empty string if input is "". Some comments disagreed with this, and it's possible the change causes a memory leak in some app, but the alternative of returning NULL when passed "" is dangerous as some code may free the return value in this case. (In fact, libmediaart itself does so). Also, make behaviour occur independently of whether `G_ENABLE_CONSISTENCY_CHECKS` was defined at build time.
* extract, cache: Remove all .mediaartlocal usesremove-mediaartlocalMartyn Russell2014-10-171-68/+17
| | | | | | | This is deemed quite useless now and we should not be littering the file system with .mediaartlocal directories everywhere. https://bugzilla.gnome.org/show_bug.cgi?id=722795
* cache: Fixed removing media art, was failing badlyMartyn Russell2014-10-171-55/+51
|
* cache: Added media_art_remove_async() and _finish()Martyn Russell2014-10-171-12/+155
| | | | | | | | Part of this API changes makes the media_art_get_{path|file}() APIs not do i/o operations like creating the cache directory. This is now done in media_art_process_new(). https://bugzilla.gnome.org/show_bug.cgi?id=724879
* cache: Allow null values in artist, title and prefixArnel A. Borja2014-09-101-6/+6
| | | | | | | | | The function media_art_get_file checks for null values in artist, title and prefix arguments, and puts special values on them if they do. Do the same on media_art_get_path which calls media_art_get_file internally. https://bugzilla.gnome.org/show_bug.cgi?id=727478
* cache: Make the documentation for media_art_get_path() and _get_file() clearerMartyn Russell2014-08-151-20/+73
| | | | | | | Also added some checks into the API and a return value to know if the function was successful. https://bugzilla.gnome.org/show_bug.cgi?id=734837
* libmediaart: Split API into _process_buffer() and _process_file()Martyn Russell2014-07-281-20/+23
| | | | | | | This is quite an API break, but the previous API was confusing and a monster, so this was really necessary. The unit tests have been put in place to make sure things work correctly too.
* cache: Improve _remove() function and fix crash with NULL passedMartyn Russell2014-02-071-33/+45
|
* cache: Improve _strip_invalid_entites() APIMartyn Russell2014-02-071-1/+9
| | | | | | Add more information to documentation. Add a check on the input string to make sure we avoid crashes. Add test case
* cache: Fix Non-void function should return a valueTing-Wei Lan2014-02-071-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723847
* tests: Added to the unit tests to test ALL APIs.Martyn Russell2013-10-231-1/+3
| | | | | There are many cases which fail and there are FIXMEs in the test case now which we should fix before releasing.
* Documentation fixesSam Thursfield2013-10-171-1/+17
|
* cache: Add media_art_get_file()Carlos Garnacho2013-10-071-35/+78
| | | | | | | This call is similar to media_art_get_path(), but using GFiles for in/out path parameters. This older function now internally uses the just added one, so internally operations happen on GFiles.
* cache: Add missing annotations and other doc fixesArnel A. Borja2013-08-211-6/+8
|
* libmediaart: Merged utils.[ch] into cache.[ch]Martyn Russell2013-08-151-3/+293
|
* libmediaart: Added, fixed, cleaned up documentation in sourcesMartyn Russell2013-08-151-6/+4
|
* libmediaart: Removed queue.[ch] and created cache.[ch] more aptly namedMartyn Russell2013-08-151-0/+135