Added example

This commit is contained in:
Mike Nolan 2022-05-11 19:25:46 -05:00
parent fd05cf2425
commit fbff9e3d8f
2 changed files with 15 additions and 13 deletions

View File

@ -161,12 +161,12 @@ namespace Tesses.YouTubeDownloader
[Flags] [Flags]
public enum ChannelBellInfo public enum ChannelBellInfo
{ {
DoNothing=0, DoNothing=0b000,
GetInfo=1, GetInfo=0b001,
Notify=2, Notify=0b010 | GetInfo,
Download=3, Download=0b100 | GetInfo,
NotifyAndDownload=Notify|Download NotifyAndDownload=Notify|Download
} }
@ -210,12 +210,14 @@ namespace Tesses.YouTubeDownloader
{ {
if(BellInfo.HasFlag(ChannelBellInfo.GetInfo)) if(BellInfo.HasFlag(ChannelBellInfo.GetInfo))
{ {
await Base.AddVideoAsync(item2.InnerText,Resolution.NoDownload); if(BellInfo.HasFlag(ChannelBellInfo.Download))
} {
if(BellInfo.HasFlag(ChannelBellInfo.Download)) await Base.AddVideoAsync(item2.InnerText);
{ }else{
await Base.AddVideoAsync(item2.InnerText); await Base.AddVideoAsync(item2.InnerText,Resolution.NoDownload);
}
} }
Id=item2.InnerText; Id=item2.InnerText;
} }

View File

@ -4,8 +4,8 @@ This is an Enum
| Name | Number | Description | | 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)) | | 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) | | Notify | 3 | Notify (Calls Bell event in TYTDStorage abstract class) |
| Download | 3 | Download Video | | Download | 5 | Download Video |
| NotifyAndDownload | 5 | Does the same as both Notify And Download| | NotifyAndDownload | 6 | Does the same as both Notify And Download|