We are in the process of migrating the Spacial Wiki content to our new Help Center at spacial.com.
Please visit the Help Center for latest Tips and Tricks, Documentation and Troubleshooting.
Scan and remove all invalid songs...
The following PAL script will scan your complete song database and remove all songs that no longer exists. Be warned that for 5000+ music libraries this can take a while - so I would not recommend running this on a live station...
var D : TDataSet; D := QUERY('SELECT * FROM songlist',,True); PAL.LockExecution; D.First; while not D.EOF do begin if not FileExists(D['filename']) then begin WriteLn('Removing '+D['filename']); ExecSQL('DELETE FROM songlist WHERE ID = :ID',[D['ID']]); ExecSQL('DELETE FROM categorylist WHERE songID = :ID',[D['ID']]); end; D.Next; end; PAL.UnLockExecution;
Please note that this script is no longer needed in the newest versions of SAM.