From fbff9e3d8f2b8c08400e11c8018f5fc593f8b3ae Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Wed, 11 May 2022 19:25:46 -0500 Subject: [PATCH] Added example --- Tesses.YouTubeDownloader/SubscribedTo.cs | 20 +++++++++++--------- docs/Bell.md | 8 ++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Tesses.YouTubeDownloader/SubscribedTo.cs b/Tesses.YouTubeDownloader/SubscribedTo.cs index 6c27691..63ebc0e 100644 --- a/Tesses.YouTubeDownloader/SubscribedTo.cs +++ b/Tesses.YouTubeDownloader/SubscribedTo.cs @@ -161,12 +161,12 @@ namespace Tesses.YouTubeDownloader [Flags] public enum ChannelBellInfo { - DoNothing=0, - GetInfo=1, + DoNothing=0b000, + GetInfo=0b001, - Notify=2, + Notify=0b010 | GetInfo, - Download=3, + Download=0b100 | GetInfo, NotifyAndDownload=Notify|Download } @@ -210,12 +210,14 @@ namespace Tesses.YouTubeDownloader { if(BellInfo.HasFlag(ChannelBellInfo.GetInfo)) { - await Base.AddVideoAsync(item2.InnerText,Resolution.NoDownload); - } - if(BellInfo.HasFlag(ChannelBellInfo.Download)) - { - await Base.AddVideoAsync(item2.InnerText); + if(BellInfo.HasFlag(ChannelBellInfo.Download)) + { + await Base.AddVideoAsync(item2.InnerText); + }else{ + await Base.AddVideoAsync(item2.InnerText,Resolution.NoDownload); + } } + Id=item2.InnerText; } diff --git a/docs/Bell.md b/docs/Bell.md index 41f52af..c42f005 100644 --- a/docs/Bell.md +++ b/docs/Bell.md @@ -4,8 +4,8 @@ This is an Enum | Name | Number | Description | | ---- | ---- | --------------| -| DoNothing | 0 | Disable Bell| +| DoNothing | 0 | Disable Bell| | GetInfo | 1 | Get info about video only (different from getinfo arg on requests (that is for getting channel info)) | -| Notify | 2 | Notify (Calls Bell event in TYTDStorage abstract class) | -| Download | 3 | Download Video | -| NotifyAndDownload | 5 | Does the same as both Notify And Download| \ No newline at end of file +| Notify | 3 | Notify (Calls Bell event in TYTDStorage abstract class) | +| Download | 5 | Download Video | +| NotifyAndDownload | 6 | Does the same as both Notify And Download| \ No newline at end of file