diff --git a/.vs/youtube-downloader/v16/.suo b/.vs/youtube-downloader/v16/.suo index 94bba03..9fe42a4 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 69493e5..2bff625 100644 --- a/Server/Functions/Downloader.cs +++ b/Server/Functions/Downloader.cs @@ -502,9 +502,30 @@ namespace youtube_downloader.Server.Functions List media = new List(); try { - await DL.ytc.Search.GetVideosAsync(text).ForEachAsync((e) => { media.Add(new SavedMedia() { Title = e.Title, Id = e.Id, Kind = InfoType.Video }); }); - await DL.ytc.Search.GetPlaylistsAsync(text).ForEachAsync((e) => { media.Add(new SavedMedia() { Title = e.Title, Id = e.Id, Kind = InfoType.Playlist }); }); - await DL.ytc.Search.GetChannelsAsync(text).ForEachAsync((e) => { media.Add(new SavedMedia() { Title = e.Title, Id = e.Id, Kind = InfoType.Channel }); }); + await DL.ytc.Search.GetVideosAsync(text).ForEachAsync((e) => { + foreach(var t in e.Thumbnails) + { + DL._DownloadThumbnail(t.Resolution.Width, t.Resolution.Height, e.Id, t.Url); + } + media.Add(new SavedMedia() {Title = e.Title, Id = e.Id, Kind = InfoType.Video }); + + }); + await DL.ytc.Search.GetPlaylistsAsync(text).ForEachAsync((e) => { + foreach (var t in e.Thumbnails) + { + DL._DownloadThumbnail(t.Resolution.Width, t.Resolution.Height, e.Id, t.Url); + } + media.Add(new SavedMedia() { Title = e.Title, Id = e.Id, Kind = InfoType.Playlist }); + + }); + await DL.ytc.Search.GetChannelsAsync(text).ForEachAsync((e) => { + foreach (var t in e.Thumbnails) + { + DL._DownloadThumbnail(t.Resolution.Width, t.Resolution.Height, e.Id, t.Url); + } + media.Add(new SavedMedia() { Title = e.Title, Id = e.Id, Kind = InfoType.Channel }); + + }); }catch (Exception ex) { _ = ex; diff --git a/bin/Debug/youtube-downloader.exe b/bin/Debug/youtube-downloader.exe index 9312185..94d3b13 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 34a2370..7d56840 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 9312185..94d3b13 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 34a2370..7d56840 100644 Binary files a/obj/Debug/youtube-downloader.pdb and b/obj/Debug/youtube-downloader.pdb differ