Exemple #1
0
        private static void ItemDownloaded(DownloadItemResult_t result)
        {
            // Make sure someone is listening to event
            if (OnItemDownloaded == null) return;

            DownloadItemEventArgs args = new DownloadItemEventArgs { Result = result };
            OnItemDownloaded(null, args);
        }
        /// <summary>
        /// Called by FeedSource, after an enclosure has been downloaded.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        internal void OnDownloadedEnclosure(object sender, DownloadItemEventArgs e)
        {
            FeedSourceEntry entry = sourceManager.SourceOfFeed(e.DownloadItem.OwnerFeedId);

            /* create playlists in media players if that option is selected */
            if (Preferences.AddPodcasts2WMP)
            {
                AddPodcastToWMP(e.DownloadItem);
            }

            if (Preferences.AddPodcasts2ITunes)
            {
                AddPodcastToITunes(e.DownloadItem);
            }

            /* update GUI if needed */
            InvokeOnGui(delegate
            {
                guiMain.OnEnclosureReceived(entry, e.DownloadItem);
            });
        }