private void Downloader_DownloadFinish(object sender, SongItemDownloader e)
 {
     songs.Remove(e);
     if (songs.Count < max_downloading_size)
     {
         MergedSong song = queqes.Dequeue();
         AddDownload(song);
     }
 }
Exemple #2
0
        public void AddDownload(MergedSong song)
        {
            SongItemDownloader downloader = new SongItemDownloader(musicProviders, target, song);

            downloader.DownloadFinish += Downloader_DownloadFinish;

            songs.Add(downloader);

            downloader.Download();
        }
        public void AddDownload(MergedSong song)
        {
            if (songs.Count >= max_downloading_size)
            {
                queqes.Enqueue(song);
                return;
            }

            SongItemDownloader downloader = new SongItemDownloader(musicProviders, target, song, rate);

            downloader.DownloadFinish += Downloader_DownloadFinish;

            songs.Add(downloader);

            downloader.Download();
        }
Exemple #4
0
 private void Downloader_DownloadFinish(object sender, SongItemDownloader e)
 {
     songs.Remove(e);
 }