Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public static void DownloadVideo(string watchUrl, string destination)
        {
            //Get links for video, then download
            ObservableCollection <InnerTubeVideo> Videos = InnerTubeService.GetSingleVideo(watchUrl);

            DownloadVideo(Videos[0], destination);
        }
Exemplo n.º 3
0
        public static void DownloadImage(string watchUrl, string destination)
        {
            ObservableCollection <InnerTubeVideo> Videos = InnerTubeService.GetSingleVideo(watchUrl);

            DownloadImage(Videos[0], destination);
        }