# Locating Missing Tracks

If your tags are messed up due to tagging errors made in the past, it is possible that you have what appears to be albums with tracks which are missing. These missing tracks may in fact be present in your library. Using Discogs or MusicBrainz and a Track database it may be possible to locate the missing tracks.

Yate takes the metadata for a missing track and assigns a weight to each entry in a track database. This weighing algorithm is based on a track's length and word matches in other metadata fields. The algorithm will more than likely be tuned from time to time. The algorithm will ignore words found in the Preferences exception set marked as the Weight Exceptions set.

Before you start, you have to create a track database representing the contents of your library. In Preferences-Export Sets create an export set which contains the fields you want in the database. When creating the set you are given the opportunity to choose from various canned templates. At a minimum you must have File Path, Album, Artist, Title and Track fields. Including Album Artist and Disc may improve the quality of the weighing algorithm. Once you have your export set, write a simple action which has a Create Track Database function. If you are interested in seeing album art in the Track database you can display the artwork on folder icons or in folder.jpg files. If you want to use the default of folder.jpg files and the files do not exist, place an Artwork to folder.jpg action function in your action. Once your action is complete, start the Batch Processor from the Action menu; choose your action and drag over the root of your library. This will create the Track database.

Make sure that you specify the name of your Track database in the Discogs or MusicBrainz preferences.

To find missing tracks in an album, load the album into the file list. It is a good idea to load the contents of one folder, preferably one album, at a time. Right click on a track in the album and start either the Discogs or MusicBrainz wizard. Step through the steps of the Wizard until you come to the mapping section. If tracks are missing you will see items with ... not mapped... for the file mapping. Right click on one of these entries and select Look for Missing File. If not already open, your database will be opened and possible matches will be filtered and sorted such that the most probable matches are closer to the top of the database display. A weight column will automatically be displayed which will disappear when the current filter is removed.

Note that when the database first opens you will receive a message advising you to switch to Playlist mode, if you are not already in it. This is required so that individual tracks as opposed to folder contents can be added to the list of open files.

If you see a match which makes sense, right click on the entry in the database and select Open. The file will be opened and added to Yate's main window and to the list of mapped files in the Discogs or MusicBrainz wizard.

Once you've found all the missing tracks for an album, or you're giving up for a lack of valid matches, you can import the Discogs or MusicBrainz settings. You can also write an action to move the open files to an appropriate single folder based on the metadata contained in the tracks. The Move action function will not move files which are already in place.

To assist in determining which albums are missing tracks you can create an Album database containing the Incomplete field, Total Tracks, and Track Count fields. The Incomplete field will contain information about missing tracks. Mote information on the Incomplete field can be found in Preference - Export Sets.