public void Synchronize(IList <Track> tracks) { Interlocked.Add(ref ManifestUtil.ProgressUtil.SongsProcessing, tracks.Count); var tracksToDownload = new List <Track>(); SyncCancellationSource.Token.ThrowIfCancellationRequested(); // define all local paths by combining the sanitzed artist (if checked by user) with the santized title FinalizePropertiesForTracks(tracks); SyncCancellationSource.Token.ThrowIfCancellationRequested(); // determine which new tracks should be downloaded NewTracksToDownload(tracks, tracksToDownload); SyncCancellationSource.Token.ThrowIfCancellationRequested(); // deletes, retags, or sets track in tracksToDownload for download AnalyseManifestTracks(tracks, tracksToDownload); SyncCancellationSource.Token.ThrowIfCancellationRequested(); // download the relevant tracks and continuously update the manifest DownloadUtil.DownloadSongs(tracksToDownload, SyncCancellationSource); if (_createPlaylists) { PlaylistUtil.CreateSimpleM3U(); //Create playlist file } }
public void Synchronize(IList <Track> tracks) { var tracksToDownload = new List <Track>(); // define all local paths by combining the sanitzed artist (if checked by user) with the santized title FinalizePropertiesForTracks(tracks); // determine which new tracks should be downloaded NewTracksToDownload(tracks, tracksToDownload); // deletes, retags, or sets track in tracksToDownload for download AnalyseManifestTracks(tracks, tracksToDownload); // download the relevant tracks and continuously update the manifest DownloadUtil.DownloadSongs(tracksToDownload); if (_createPlaylists) { PlaylistUtil.CreateSimpleM3U(); //Create playlist file } }