diff --git a/src/CyberdropDownloader.Avalonia/CyberdropDownloader.Avalonia.csproj b/src/CyberdropDownloader.Avalonia/CyberdropDownloader.Avalonia.csproj index 962bfc1..6498888 100644 --- a/src/CyberdropDownloader.Avalonia/CyberdropDownloader.Avalonia.csproj +++ b/src/CyberdropDownloader.Avalonia/CyberdropDownloader.Avalonia.csproj @@ -6,7 +6,7 @@ Cyberdrop Downloader Copyright © 2022 Cyberdrop Downloader - 2.2.4.0 + 2.2.5.0 2.2.4.0 en @@ -14,7 +14,7 @@ Assets\duck.ico - 2.2.4 + 2.2.5 https://github.com/izqalan/cy-client diff --git a/src/CyberdropDownloader.Avalonia/ViewModels/MainWindowViewModel.cs b/src/CyberdropDownloader.Avalonia/ViewModels/MainWindowViewModel.cs index c67449b..af9f092 100644 --- a/src/CyberdropDownloader.Avalonia/ViewModels/MainWindowViewModel.cs +++ b/src/CyberdropDownloader.Avalonia/ViewModels/MainWindowViewModel.cs @@ -2,6 +2,7 @@ using Avalonia.Threading; using CyberdropDownloader.Avalonia.ViewModels.Core; using CyberdropDownloader.Core; +using CyberdropDownloader.Core.Exceptions; using ReactiveUI; using System; using System.Diagnostics; @@ -10,7 +11,6 @@ using System.Reflection; using System.Threading; using System.Threading.Tasks; -using CyberdropDownloader.Core.Exceptions; namespace CyberdropDownloader.Avalonia.ViewModels { @@ -135,9 +135,11 @@ await Task.Run(async () => case NullAlbumFilesException: Log("Failed to fetch album files."); break; - } - continue; + default: + Log("Unknown webscraper error. Please report this to the github repository."); + continue; + } } // If the album url is invalid, then log and skip over it diff --git a/src/CyberdropDownloader.Core/WebScraper.cs b/src/CyberdropDownloader.Core/WebScraper.cs index d79fab4..56e8aac 100644 --- a/src/CyberdropDownloader.Core/WebScraper.cs +++ b/src/CyberdropDownloader.Core/WebScraper.cs @@ -25,17 +25,10 @@ await Task.Run(async () => if(htmlDocument != null) { - try - { - (string title, string size, Queue files) albumData = FetchAlbumData(htmlDocument); + (string title, string size, Queue files) albumData = FetchAlbumData(htmlDocument); - _album = new Album(albumData.title, albumData.size, albumData.files); - _successful = true; - } - catch(Exception) - { - _successful = false; - } + _album = new Album(albumData.title, albumData.size, albumData.files); + _successful = true; } }); }