Permalink
Browse files

- removed unnecessary console output and added a 0 filesize detection…

… (because youtube offers files with 0 bytes size)
  • Loading branch information...
1 parent eb27510 commit 987f967463c1820bb5d7ab37b3e1b4766c96192b @bietiekay bietiekay committed Apr 13, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 Main.cs
View
9 Main.cs
@@ -64,7 +64,7 @@ public static void Main (string[] args2)
{
//videoInfos = DownloadUrlResolver.GetDownloadUrls(url);
//video = videoInfos.First(info => info.VideoFormat == VideoFormat.Standard360);
- Console.WriteLine("Error: Video with the desired resolution is not available ("+job.ChannelDownloadDirectory+")");
+ //Console.WriteLine("Error: Video with the desired resolution is not available ("+job.ChannelDownloadDirectory+")");
//video = videoInfos.First(info => info.VideoFormat == VideoFormat.Standard360);
continue;
}
@@ -100,6 +100,13 @@ public static void Main (string[] args2)
try
{
videoDownloader.Execute();
+ FileInfo f2 = new FileInfo(filename);
+ long s2 = f2.Length;
+ if (s2 == 0)
+ {
+ File.Delete(filename);
+ Console.WriteLine("zeroed...");
+ }
}
catch(Exception e)
{

0 comments on commit 987f967

Please sign in to comment.