From 93c0f3d5ab64b5c9bd25725d16b3b04d5f833bc8 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Wed, 6 Jul 2022 18:02:17 -0500 Subject: [PATCH] Added File Download, abstracted JSON --- Tesses.YouTubeDownloader/SubscribedTo.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tesses.YouTubeDownloader/SubscribedTo.cs b/Tesses.YouTubeDownloader/SubscribedTo.cs index d92955e..88ffd37 100644 --- a/Tesses.YouTubeDownloader/SubscribedTo.cs +++ b/Tesses.YouTubeDownloader/SubscribedTo.cs @@ -98,7 +98,7 @@ namespace Tesses.YouTubeDownloader LastSubscriptionTime=date; } - public async IAsyncEnumerable GetSubscriptionsAsync() + public virtual async IAsyncEnumerable GetSubscriptionsAsync() { await foreach(var item in EnumerateFilesAsync("Subscriptions")) @@ -128,7 +128,7 @@ namespace Tesses.YouTubeDownloader Subscriptions.Add(sub); await SaveSubscription(sub); } - public async Task SaveSubscription(Subscription sub) + public virtual async Task SaveSubscription(Subscription sub) { await WriteAllTextAsync($"Subscriptions/{sub.Id}.json",JsonConvert.SerializeObject(sub)); } @@ -142,7 +142,7 @@ namespace Tesses.YouTubeDownloader { return Subscriptions; } - public void Unsubscribe(ChannelId id) + public virtual void Unsubscribe(ChannelId id) { Subscription sub= Subscriptions.FirstOrDefault(e=>e.Id==id.Value); if(sub != null)