Update the freshed state

This commit is contained in:
hak8or 2018-02-20 18:00:05 -05:00
parent 1e42ac746f
commit 01bc50f9f2
1 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,9 @@ namespace YTManager.Tasks {
// 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));
// Say the channel has been refreshed.
channel.Refreshed = DateTime.Now;
// Add all the videos to the databse.
await db.Videos.AddRangeAsync(newvids);