wrap in try
This commit is contained in:
parent
7b67eef692
commit
4b4db4fbff
Binary file not shown.
|
@ -82,11 +82,18 @@ namespace youtube_downloader.Server.Functions
|
||||||
}
|
}
|
||||||
if (canAdd)
|
if (canAdd)
|
||||||
{
|
{
|
||||||
var items = await item.DownloadData();
|
try
|
||||||
if(item.DownloadActualDataAfterwards)
|
|
||||||
{
|
{
|
||||||
_DownloadVideos(items);
|
var items = await item.DownloadData();
|
||||||
}
|
if (item.DownloadActualDataAfterwards)
|
||||||
|
{
|
||||||
|
_DownloadVideos(items);
|
||||||
|
}
|
||||||
|
}catch(Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine(ex.Message);
|
||||||
|
_ = ex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while (true);
|
} while (true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,12 +87,12 @@ namespace youtube_downloader.Server.Models
|
||||||
return new SavedVideoObject[] { sv };
|
return new SavedVideoObject[] { sv };
|
||||||
}
|
}
|
||||||
case InfoType.Playlist:
|
case InfoType.Playlist:
|
||||||
{
|
{ List<SavedVideoObject> video2 = new List<SavedVideoObject>();
|
||||||
|
|
||||||
List<string> vo = new List<string>();
|
List<string> vo = new List<string>();
|
||||||
SavedPlaylist pl = await SavedPlaylist.FromPlaylistId(res, Functions.Downloader.DL.ytc, Data, (e,f) => { vo.Add(e); }, Functions.Downloader.DL._DownloadThumbnail);
|
SavedPlaylist pl = await SavedPlaylist.FromPlaylistId(res, Functions.Downloader.DL.ytc, Data, (e,f) => { vo.Add(e); }, Functions.Downloader.DL._DownloadThumbnail);
|
||||||
string infpath = Functions.Downloader.DL.GetPath(true, "Playlist", Data + ".json");
|
string infpath = Functions.Downloader.DL.GetPath(true, "Playlist", Data + ".json");
|
||||||
File.WriteAllText(infpath, JsonConvert.SerializeObject(pl));
|
File.WriteAllText(infpath, JsonConvert.SerializeObject(pl));
|
||||||
List<SavedVideoObject> video2 = new List<SavedVideoObject>();
|
|
||||||
foreach(var str in vo)
|
foreach(var str in vo)
|
||||||
{
|
{
|
||||||
string infPath = Functions.Downloader.DL.GetPath(true, "Info", str + ".json");
|
string infPath = Functions.Downloader.DL.GetPath(true, "Info", str + ".json");
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue