Video adding and subscriptions finished

This commit is contained in:
2022-05-11 20:50:50 +02:00
Unverified
parent 7a57fb65f3
commit 7acaeb24de
92 changed files with 3917 additions and 3314 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using VDownload.Core.Interfaces;
@@ -32,15 +33,15 @@ namespace VDownload.Core.Services
#region PUBLIC METHODS
public async Task<IVideo[]> GetNewVideosAsync()
public async Task<IVideo[]> GetNewVideosAsync(CancellationToken cancellationToken = default)
{
await Playlist.GetVideosAsync();
await Playlist.GetVideosAsync(cancellationToken);
return GetUnsavedVideos();
}
public async Task<IVideo[]> GetNewVideosAndUpdateAsync()
public async Task<IVideo[]> GetNewVideosAndUpdateAsync(CancellationToken cancellationToken = default)
{
await Playlist.GetVideosAsync();
await Playlist.GetVideosAsync(cancellationToken);
IVideo[] newVideos = GetUnsavedVideos();
SavedVideos = Playlist.Videos;
return newVideos;