Beginings of api rework with channel inclusion

This commit is contained in:
2018-02-23 23:03:27 -05:00
parent 01bc50f9f2
commit f708503072
4 changed files with 107 additions and 20 deletions

View File

@ -99,7 +99,12 @@ namespace YTManager.Tasks {
var Videos = await Get_YTVideos(channel.YoutubeID);
// Get all the videos which haven't been put into this channels videos.
var newvids = Videos.Where(nv => !channel.Videos.Any(cv => cv.YoutubeID == nv.YoutubeID));
var newvids = Videos
.Where(nv => !channel.Videos.Any(cv => cv.YoutubeID == nv.YoutubeID));
// Say what channel all the videos came from.
foreach (var v in newvids)
v.channel = channel;
// Say the channel has been refreshed.
channel.Refreshed = DateTime.Now;