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