# Access Beatport

This function is used to import metadata from tracks purchased from Beatport.

Matching tracks to Beatport's data is done via a Track ID. This Track ID is embedded in some purchased files and is a part of the filename for all purchased files. Yate attempts to find the Track ID as follows:

- If a UDTI item named Beatport Track Id is present, its value is assumed to be a Track ID set when previously importing metadata.
- If a Unique File Identifier exists with a description containing www.beatport.com, its associated value is used. Note that on some Stem files a UDTI named UFID is used.
- If a Unique File Identifier exists with a value field of track-#, it is used.
- If the filename starts with #_, the Track ID is extracted from the filename.
- If a Track Id cannot be determined and the file is a Stem file, an attempt is made to read an explicit Stem Id UDTI or to extract it from the metadata. If a Stem Id can be determined, it can be used to download information which identifies the Track Id.
- If neither a Track Id or Stem Id can be determined, no attempt is made to match the track with the missing information.

Choose which metadata types you wish to import. The definitions for the metadata types can are documented in the Beatport Importer.

You can elect to only write data to fields in tracks which are currently empty via the Only import to empty items setting. Note that this option is ignored on the URL metadata types.

Certain imported items may have more than one value. By default the multi value delimiter will be used as the join sequence (the sequence to separate values). You can specify an alternate join sequence if you wish.

While the function is valid in all execution modes it is more efficient when run stepwise as common artwork items will only be downloaded once.

Named variable Data Source Access Error will be set as follows:

> empty
>   No errors
> -1
>   A Beatport Track Id could not be established for any selected files.
> -2
>   Data was missing or was not valid JSON.
> An http status code
>   Represents an unexpected response.