예제 #1
0
        private object UpdateFeeds(object state)
        {
            checkForCancellation();

            InnerTubeFeed feed = ((InnerTubeFeed)state).Clone();
            ObservableCollection <InnerTubeVideo> newVideos = InnerTubeService.ConvertYouTubeXmlToObjects(new Uri(feed.FeedUrl), this.settings);

            //pull just videos we don't have yet
            var newVids = from a in newVideos
                          from b in
                          (from n in newVideos
                           select n.Id).Except(from o in feed.FeedVideos
                                               select o.Id)
                          where a.Id == b
                          select a;

            foreach (var n in newVids)
            {
                feed.FeedVideos.Add(n);
            }

            string status = "updated feed: " + feed.FeedName;

            WriteStatus(status);
            return(feed);
        }
예제 #2
0
파일: Download.cs 프로젝트: hungmol/c4fbook
        public static void DownloadVideo(string watchUrl, string destination)
        {
            //Get links for video, then download
            ObservableCollection <InnerTubeVideo> Videos = InnerTubeService.GetSingleVideo(watchUrl);

            DownloadVideo(Videos[0], destination);
        }
예제 #3
0
파일: Download.cs 프로젝트: hungmol/c4fbook
        public static void DownloadImage(string watchUrl, string destination)
        {
            ObservableCollection <InnerTubeVideo> Videos = InnerTubeService.GetSingleVideo(watchUrl);

            DownloadImage(Videos[0], destination);
        }