# Auto Search for Artwork

This function is used to search for artwork based on the metadata of the selected files. The largest artwork possible will be downloaded and will be scaled down if a scaling option was set in Preferences-Artwork.

Searches are performed for every unique album. The uniqueness of an album is determined by Album, Album Artist, Artist metadata and Yate Album IDs. Note that Yate Album IDs are optional and are only used if more than one album has the same name.

While every attempt has been made to avoid the choice of an incorrect artwork item, it is entirely possible that an incorrect choice can be made. Without visual verification of an artwork choice, errors are always possible. This is especially true with collections such as Louis Armstrong/The Best of Louis Armstrong. There are more than likely dozens, if not more, of different The Best of Louis Armstrong releases.

You can disable UI based error messages by selecting the Silent option. Note that Silent is implied when running the action via the Batch Processor Wizard.

When Use defaults is selected, the options specified in Preferences-Artwork-Configure Auto Search will be used. When Use defaults is not selected, you can override the current preference settings. The settings are described here.

The result of the operation is returned in a named variable called Auto Search Status. The format of the named variable's value is:

> #: text

# is provided as a convenience so that numeric comparisons can be used to test the results. text is a human readable description of the result. The following # values can be returned:

> 0: width x height (pixel count) [import count]
>   An image was downloaded and stored to the tracks. The text describes the dimensions and pixel count of a retained image and the total number of images which were imported. If more than one image was imported, the dimensions and pixel count will be 0.
> 1: No artwork found
>   No items matching the metadata could be located.
> 2: The downloaded artwork was a duplicate
>   The downloaded artwork was not saved.
> 3: text
>   Typically describes a network related error.
> 4: text
>   Typically describes a metadata error which caused the search not to be run. ie. missing or inconsistant metadata.
> 5: text
>   The Ignore if downloaded artwork is smaller option is in use. The search was not performed as the current default artwork item is as large or larger than the maximum size specified in the scaling size preference.
> 6: text
>   The Ignore if downloaded artwork is smaller option is in use. The downloaded artwork was not saved as it was not larger than than the current default artwork item.

When more than one search is being performed, 0: ... will always be returned in any artwork was imported. When more than one search is being performed, a non 0 return code represents the last error encountered.

While valid during Grouped execution, this statement is far more efficient when run stepwise.