예제 #1
0
        private void UpdateAudioInfo(Podcast p)
        {
            if (stream == 0)
            {
                return;
            }
            AudioInfo ai;

            try {
                ai = new AudioInfo(stream);
            } catch (Exception) { return; }
            if (ai == null)
            {
                return;
            }
            wnd_player.SetName(ai.title);
            wnd_player.SetArtist(ai.artist);
            var chapters = new List <AudioInfo.Chapter>();

            foreach (AudioInfo.Chapter ch in ai.chapters)
            {
                chapters.Add(ch);
            }
            foreach (Bookmark b in Podcasts.GetPodcastBookmarks(p))
            {
                var ch = new AudioInfo.Chapter();
                ch.name        = "Zakładka: " + b.name;
                ch.time        = b.time;
                ch.userDefined = true;
                chapters.Add(ch);
            }
            wnd_player.SetChapters(chapters.ToArray());
        }
예제 #2
0
 public void UpdateBookmarks()
 {
     bookmarks = Podcasts.GetPodcastBookmarks(podcast);
     lst_bookmarks.Items.Clear();
     foreach (Bookmark b in bookmarks)
     {
         lst_bookmarks.Items.Add(b.name);
     }
     edt_name.Text = "";
 }