Exemplo n.º 1
0
        public async Task <string> DownloadAudioHandler(Podcast SelectedPodcast)
        {
            String Title   = SelectedPodcast.Title;
            String PlayURL = SelectedPodcast.PlayURL;

            Task <String> DownloadMP3Task = MP3Downloader.DownloadMP3FileAsync(Title, PlayURL);

            await DownloadMP3Task;

            StartAudio(DirectoryHandler.GetPlayableMP3File(SelectedPodcast));
            SelectedPodcast.ListenCount++;

            return(DownloadMP3Task.Result);
        }
Exemplo n.º 2
0
        public void StartAlreadyDownloadedMP3(Podcast SelectedPodcast, Feed SelectedFeed)
        {
            Podcast SelectedPodcastTemporary = SelectedPodcast;
            Feed    SelectedFeedTemporary    = SelectedFeed;

            SelectedFeedTemporary.RemoveDataFromList(SelectedPodcast);

            FeedController.RemoveDataFromList(SelectedFeedTemporary);

            SelectedPodcastTemporary.ListenCount++;

            SelectedFeedTemporary.AddDataToList(SelectedPodcastTemporary);

            FeedController.AddDataToList(SelectedFeedTemporary);

            HandleXMLSaving();
            StartAudio(DirectoryHandler.GetPlayableMP3File(SelectedPodcast));
        }
Exemplo n.º 3
0
 public String GetPlayableMP3File(Podcast SelectedPodcast)
 {
     return(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\PodcastProgram\\DownloadedPodcasts\\" + SelectedPodcast.Title + ".mp3");
 }
Exemplo n.º 4
0
        public List <String> GetPodcastInfo(Podcast SelectedPodcast)
        {
            List <String> PodcastInfoList = new List <String>(new String[] { SelectedPodcast.Title, SelectedPodcast.PublishingDate, SelectedPodcast.ListenCount.ToString() });

            return(PodcastInfoList);
        }