public void DownloadNewEpisodes()
        {
            List <PodcastEpisode> ppe;

            lock (episodeLock)
            {
                ppe = episodes.ToList();
            }
            if (ppe.Count > 0)
            {
                ppe.Sort((a, b) => b.Date.CompareTo(a.Date));

                ppe = ppe.TakeWhile(p => p.DownloadStatus == PodcastDownloadStatus.NotDownloaded).ToList();

                foreach (PodcastEpisode pe in ppe)
                {
                    PodcastSubscription.Download(pe);
                }

                if (DataChanged != null)
                {
                    DataChanged(this);
                }
            }
        }
        public void DownloadLatestEpisode()
        {
            PodcastEpisode pe = this.LatestEpisode;

            if (pe != null && pe.IsQueueable)
            {
                PodcastSubscription.Download(pe);

                if (DataChanged != null)
                {
                    DataChanged(this);
                }
            }
        }
Exemple #3
0
 private void lvwEpisodes_DoubleClickCallback(PodcastEpisode SelectedItem)
 {
     if (!Locked)
     {
         if (SelectedItem.Playable)
         {
             Controller.GetInstance().Play(SelectedItem);
         }
         else
         {
             PodcastSubscription.Download(SelectedItem);
             lvwEpisodes.Invalidate();
         }
     }
 }
        public void DownloadThisSubscription()
        {
            List <PodcastEpisode> ppe;

            lock (episodeLock)
            {
                ppe = this.episodes.FindAll(e => !e.IsDeleted);
            }
            ppe.Sort((a, b) => (b.Date.CompareTo(a.Date)));

            foreach (PodcastEpisode pe in ppe)
            {
                PodcastSubscription.Download(pe);
            }

            if (DataChanged != null)
            {
                DataChanged(this);
            }
        }
Exemple #5
0
 public void QueueForDownload()
 {
     PodcastSubscription.Download(this);
 }