示例#1
0
        public string hamtaIntervallFörPod(string kategori, string podcast)
        {
            PodcastData podcastData  = new PodcastData();
            string      intervallTid = podcastData.hamtaPodcastInfo("interval", kategori, podcast);

            return(intervallTid);
        }
        public string hamtaPodcastIntervall(string kategori, string podcast)
        {
            PodcastData podcastsElm = new PodcastData();

            var intervall = podcastsElm.hamtaPodcastInfo("interval", kategori, podcast);

            switch (intervall)
            {
            case "5000":
                intervall = "Var 5e sekund";
                break;

            case "10000":
                intervall = "Var 10e sekund";
                break;

            case "20000":
                intervall = "Var 20e sekund";
                break;

            case "30000":
                intervall = "Var 30e sekund";
                break;
            }
            return(intervall);
        }
        private string hamtaSenastSync(string kategori, string podcast)
        {
            PodcastData podcastData = new PodcastData();
            string      senastSync  = podcastData.hamtaPodcastInfo("lastSync", kategori, podcast);

            return(senastSync);
        }
        public string hamtaPodcastUrl(string kategori, string podcast)
        {
            PodcastData podcastsElm = new PodcastData();

            var podUrl = podcastsElm.hamtaPodcastInfo("url", kategori, podcast);

            return(podUrl);
        }
示例#5
0
 private static string[] GetTags(PodcastData src)
 {
     if (string.IsNullOrEmpty(src.Tags))
     {
         return(Array.Empty <string>());
     }
     return(src.Tags.Split(',', StringSplitOptions.RemoveEmptyEntries));
 }
        public void andraPodcastItem(string kategori, string podcast, string item, string nyttItem)
        {
            PodcastData podelm = new PodcastData();

            if (nyttItem != "")
            {
                podelm.andraPodcastInfo(kategori, podcast, item, nyttItem);
            }
        }
示例#7
0
        public static Podcast FromData(IServiceContext serviceContext, PodcastData data)
        {
            Podcast podcast = new Podcast(serviceContext);

            podcast.Title                = data.Title;
            podcast.Description          = data.Description;
            podcast.Image                = data.Image;
            podcast.LastRefreshTimeTicks = data.LastRefreshTimeTicks;
            podcast.Episodes             = new ConcurrentObservableCollection <Episode>(s_EpisodeOrdering, true);
            foreach (EpisodeData episodeData in data.Episodes)
            {
                Episode episode = Episode.FromData(serviceContext, podcast.FileName, episodeData);
                podcast.Episodes.Add(episode);
            }
            podcast.Episodes.HoldNotifications = false;
            return(podcast);
        }
示例#8
0
        public PodcastData ToData()
        {
            PodcastData data = new PodcastData()
            {
                Title                = Title,
                Description          = Description,
                Image                = Image,
                LastRefreshTimeTicks = LastRefreshTimeTicks
            };
            List <EpisodeData> episodes = new List <EpisodeData>();

            data.Episodes = episodes;
            foreach (Episode episode in Episodes)
            {
                episodes.Add(episode.ToData());
            }
            return(data);
        }