file


Description:

public bool file (Type type, ProcessFlags flags, File file, string? artist, string? title) throws Error

Process file and check if media art exists and if it is up to date with artist and title provided.

Either artist OR title can be null, but they can not both be null.

NOTE: This function MAY retrieve media art for artist and title combinations. It is not guaranteed and depends on download services available over DBus at the time.

In cases where download is unavailable, file will only try to procure a cache for possible media art found in directories surrounding the location of file. If a buffer or memory chunk needs to be saved to disk which has been retrieved from an MP3 (for example), you should use buffer.

The modification time (mtime) of file is checked against the cached stored for artist and title. If the cache is old or doesn't exist, it will be updated. What this actually does is update the mtime of the cache (a symlink) on the disk.

If there is no actual media art stored locally (for example, it's stored in a directory on a removable device), it is copied locally ( usually to an XDG cache directory).

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.

Parameters:

this

Media art process object

type

The type of media

flags

The options given for how to process the media art

file

File to be processed

artist

The artist name file or null

title

The title for file or null

Returns:

true if file could be processed or false if throws is set.




2022 vala-language.org