Raw buffer representing content to save
MIME type for buffer
Output file name (not URI) to save converted content to
The error domain for #MediaArtError.
Save filename
to target
as JPEG format. The filename
may not be
a JPEG in the first place.
Original file name (not URI) to convert
Output file name (not URI) to save converted content to
Gets the files pointing to cache files suitable for storing the media
art provided by the artist,
title
and file
arguments. cache_file
will point to a location in the XDG user cache directory..
The cache_file
relates to a symlink stored in XDG cache directories
for the user. A cache_file
would be expected to look like
When done, both #GFiles must be freed with g_object_unref() if non-%NULL.
This operation should not use i/o, but it depends on the backend GFile implementation.
All string inputs must be valid UTF8. Use g_utf8_validate() if the input has not already been validated.
the artist
the title
the prefix for cache files, for example "album"
This function calls media_art_get_file() by creating a #GFile for
uri
and passing the same arguments to media_art_get_file(). For more
details about what this function does, see media_art_get_file().
Get the path to media art for a given resource. Newly allocated
data returned in cache_path
must be freed with g_free().
All string inputs must be valid UTF8. Use g_utf8_validate() if the input has not already been validated.
the artist
the title
the prefix, for example "album"
This function facilitates a plugin's need to create any internal caches before anything else is done. This function must exist in each plugin and is called immediately after the plugin is loaded. Conversely, media_art_plugin_shutdown() is called before tear down of the plugin system or plugin itself.
The maximum width that an image is allowed to be
This function facilitates a plugin's need to clean up any internal caches. This function must exist in each plugin and is called immediately after the plugin is loaded. Conversely, media_art_plugin_init() is called after the plugin is loaded.
Removes media art for given album/artist provided.
If artist
and album
are %NULL, ALL media art cache is removed.
All string inputs must be valid UTF8. Use g_utf8_validate() if the input has not already been validated.
artist the media art belongs to
album the media art belongs or %NULL
optional #GCancellable object, %NULL to ignore.
Removes media art for given album/artist provided. Precisely the same operation as media_art_remove() is performing, but asynchronously.
When all i/o for the operation is finished the callback
will be
called.
In case of a partial error the callback will be called with any succeeding items and no error, and on the next request the error will be reported. If a request is cancelled the callback will be called with %G_IO_ERROR_CANCELLED.
During an async request no other sync and async calls are allowed, and will result in %G_IO_ERROR_PENDING errors.
Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is %G_PRIORITY_DEFAULT.
All string inputs must be valid UTF8. Use g_utf8_validate() if the input has not already been validated.
artist the media art belongs to
album the media art belongs or %NULL
the [I/O priority][io-priority] of the request
the #GObject this task belongs to, can be %NULL.
optional #GCancellable object, %NULL to ignore
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the asynchronous operation started with media_art_remove_async().
the #GObject this task belongs to, can be %NULL.
a #GAsyncResult.
Strip a albumname or artistname string to prepare it for calculating the media art path with it. Certain characters and charactersets will be stripped and a newly allocated string returned which you must free with g_free().
This functions is used internally by media_art_get_file() and media_art_get_path(). You will not normally need to call it yourself.
This function provides the following features:
#
$^&*+=|/"'?~;This function expects that the input is valid UTF-8. Use g_utf8_validate() if the input has not already been validated.
original string
This function performs the same operation as media_art_file_to_jpeg() with the exception that a raw
buffer
can be used instead providinglen
and thebuffer_mime
too.