diff --git a/.vs/youtube-downloader/v16/.suo b/.vs/youtube-downloader/v16/.suo index d0e8d98..f4f2ed1 100644 Binary files a/.vs/youtube-downloader/v16/.suo and b/.vs/youtube-downloader/v16/.suo differ diff --git a/Server/Functions/Downloader.cs b/Server/Functions/Downloader.cs index 2c20d83..fdf0138 100644 --- a/Server/Functions/Downloader.cs +++ b/Server/Functions/Downloader.cs @@ -402,11 +402,17 @@ namespace youtube_downloader.Server.Functions } public static void Download(string id,Resolution res) { + bool hasForwardSlash = false; + if (!string.IsNullOrEmpty(id)) + { + hasForwardSlash = id.Contains("/"); + } + VideoId? vid= VideoId.TryParse(id); ChannelId? cid = ChannelId.Parse(id); UserName? uid = UserName.TryParse(id); PlaylistId? pid = PlaylistId.Parse(id); - if (pid.HasValue) + if (pid.HasValue && hasForwardSlash) // check for forward slash so we dont get confused { //Is Playlist var v = pid.Value; @@ -416,16 +422,8 @@ namespace youtube_downloader.Server.Functions DL.infoQueue.Insert(0, item); } } - else if (cid.HasValue) - { - var v = cid.Value; - InfomationQueueItem item = new InfomationQueueItem(v, res, true); - lock (DL.infoQueue) - { - DL.infoQueue.Insert(0, item); - } - } - else if (vid.HasValue) + + else if (vid.HasValue) //support 11 char id alone so dont check here { var v = vid.Value; InfomationQueueItem item = new InfomationQueueItem(v, res, true); @@ -434,7 +432,16 @@ namespace youtube_downloader.Server.Functions DL.infoQueue.Insert(0, item); } } - else + else if (cid.HasValue && hasForwardSlash) + { + var v = cid.Value; + InfomationQueueItem item = new InfomationQueueItem(v, res, true); + lock (DL.infoQueue) + { + DL.infoQueue.Insert(0, item); + } + } + else if(uid.HasValue && hasForwardSlash) { var v = uid.Value; InfomationQueueItem item = new InfomationQueueItem(v, res, true); diff --git a/bin/Debug/youtube-downloader.exe b/bin/Debug/youtube-downloader.exe index 7d53b1e..2b1db35 100644 Binary files a/bin/Debug/youtube-downloader.exe and b/bin/Debug/youtube-downloader.exe differ diff --git a/bin/Debug/youtube-downloader.pdb b/bin/Debug/youtube-downloader.pdb index 6bcddfd..c1792fc 100644 Binary files a/bin/Debug/youtube-downloader.pdb and b/bin/Debug/youtube-downloader.pdb differ diff --git a/obj/Debug/youtube-downloader.exe b/obj/Debug/youtube-downloader.exe index 7d53b1e..2b1db35 100644 Binary files a/obj/Debug/youtube-downloader.exe and b/obj/Debug/youtube-downloader.exe differ diff --git a/obj/Debug/youtube-downloader.pdb b/obj/Debug/youtube-downloader.pdb index 6bcddfd..c1792fc 100644 Binary files a/obj/Debug/youtube-downloader.pdb and b/obj/Debug/youtube-downloader.pdb differ