get_file


Description:


public bool get_file (string? artist, string? title, string? prefix, File? file, out File cache_file, out File local_file)

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, meanwhile local_file will point to a cache file that resides in the same filesystem than file.

The file provided is required if local_file is to be returned. The local_file relates to a location on the media the local file system or media storage it is found on, so for example, if you have a mounted volume with MP3s on it in <filename >file:///media/martyn/pendrive</filename>, the local_file will point to a URI that looks like <filename> file:///media/martyn/pendrive/.mediaartlocal/...</filename>.

The cache_file is very different to the local_file, the cache_file relates to a symlink stored in XDG cache directories for the user. A cache_file would be expected to look like <filename> file:///home/martyn/.cache/media-art/...</filename>. This is normally the location that is most useful (assuming the cache has been extracted in the first place).

When done, both File<!-- -->s must be freed with unref if non-null.

Parameters:

artist

the artist

title

the title

prefix

the prefix for cache files, for example "album"

file

a File representing the actual media art or null

cache_file

a pointer to a File which represents the cached file for media art, or null a File representing the user&apos;s cache path, or null

local_file

a pointer to a File representing the location of the local media art

Returns:

true if cache_file or local_file were returned, otherwise false.


Namespace: MediaArt
Package: libmediaart-1.0