diff --git a/Program.cs b/Program.cs index 4a3f576..328318b 100644 --- a/Program.cs +++ b/Program.cs @@ -12,6 +12,18 @@ HttpClient http=new HttpClient(); YoutubeClient ytc=new YoutubeClient(http); ConcurrentStack videoIds=new ConcurrentStack(); bool isRunning=true; +long videosDownloaded=0; + +async Task NewVideoDL() +{ + long dl; + lock(videosDownloaded) + { + dl = videosDownloaded++; + } + + if((dl % 6) == 5) await Task.Delay(60000); +} async Task AddVideo(VideoId id) { @@ -53,7 +65,7 @@ async Task AddVideo(VideoId id) } client.Disconnect(); - await Task.Delay(15000); + await NewVideoDL(); } }