Inheritance: IExtensionService, IDisposable, IDelayedInitializeService
Esempio n. 1
0
        public void Fetch()
        {
            if (feed.ImageUrl == null)
            {
                return;
            }

            string cover_art_id = PodcastService.ArtworkIdFor(feed);

            if (cover_art_id == null)
            {
                return;
            }
            else if (CoverArtSpec.CoverExists(cover_art_id))
            {
                return;
            }
            else if (!InternetConnected)
            {
                return;
            }

            if (SaveHttpStreamCover(new Uri(feed.ImageUrl), cover_art_id, null))
            {
                Banshee.Sources.Source src = ServiceManager.SourceManager.ActiveSource;
                if (src != null && (src is PodcastSource || src.Parent is PodcastSource))
                {
                    (src as Banshee.Sources.DatabaseSource).Reload();
                }
                return;
            }
        }
 private void RefreshArtworkFor(Feed feed)
 {
     if (!String.IsNullOrEmpty(feed.ImageUrl) && !CoverArtSpec.CoverExists(PodcastService.ArtworkIdFor(feed)))
     {
         Banshee.Kernel.Scheduler.Schedule(new PodcastImageFetchJob(feed), Banshee.Kernel.JobPriority.BelowNormal);
     }
 }
Esempio n. 3
0
 private void RefreshArtworkFor(Feed feed)
 {
     if (feed.LastDownloadTime != DateTime.MinValue && !CoverArtSpec.CoverExists(PodcastService.ArtworkIdFor(feed)))
     {
         Banshee.Kernel.Scheduler.Schedule(new PodcastImageFetchJob(feed), Banshee.Kernel.JobPriority.BelowNormal);
     }
 }