diff --git a/Changelog.md b/Changelog.md index 72c26af..5f6c2a9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,11 @@ +# 2023.1.24.0 + +*2023-01-24* + +- Fixed + - (Issue #100) Imgur albums not downloading + - When deleting a collection with the 'ban' option, users in the collection are not banned + # 2023.1.2.0 *2023-01-02* diff --git a/SCrawler/API/Imgur/Envir.vb b/SCrawler/API/Imgur/Envir.vb index fbb4b8b..ddf8690 100644 --- a/SCrawler/API/Imgur/Envir.vb +++ b/SCrawler/API/Imgur/Envir.vb @@ -70,11 +70,12 @@ Namespace API.Imgur Friend Shared Function GetVideoInfo(ByVal URL As String, Optional ByVal e As ErrorsDescriber = Nothing) As IEnumerable(Of UserMedia) Try If Not URL.IsEmptyString AndAlso URL.ToLower.Contains("imgur") AndAlso Not Settings.ImgurClientID.IsEmptyString Then - Dim img$ = GetImage(URL, EDP.ReturnValue) - If Not img.IsEmptyString Then - Return {New UserMedia(img)} + Dim imgList As List(Of String) = GetGallery(URL, EDP.ReturnValue) + If imgList.ListExists Then + Return imgList.Select(Function(u) New UserMedia(u)) Else - Return GetGallery(URL, EDP.ReturnValue).ListIfNothing.Select(Function(u) New UserMedia(u)) + Dim img$ = GetImage(URL, EDP.ReturnValue) + If Not img.IsEmptyString Then Return {New UserMedia(img)} End If End If Return Nothing diff --git a/SCrawler/MainFrame.vb b/SCrawler/MainFrame.vb index b5127fe..42d5f9f 100644 --- a/SCrawler/MainFrame.vb +++ b/SCrawler/MainFrame.vb @@ -1396,6 +1396,7 @@ ResumeDownloadingOperation: If result < 6 Then Dim collectionResult% = -1 Dim tmpResult% + Dim tmpUserNames As New List(Of String) Dim IsMultiple As Boolean = users.Count > 1 Dim removedUsers As New List(Of String) Dim keepData As Boolean = Not (result Mod 2) = 0 @@ -1430,10 +1431,18 @@ ResumeDownloadingOperation: removedUsers.Add(ugn(user)) user.Dispose() Else + If banUser Then + tmpUserNames.Clear() + If user.IsCollection Then + tmpUserNames.ListAddList(DirectCast(user, UserDataBind).Collections.Select(Function(u) u.Name), l) + Else + tmpUserNames.Add(user.Name) + End If + End If tmpResult = user.Delete(IsMultiple, collectionResult) If user.IsCollection And collectionResult = -1 Then collectionResult = tmpResult If tmpResult > 0 Then - If banUser Then Settings.BlackList.ListAddValue(New UserBan(user.Name, reason), l) : b = True + If banUser And tmpUserNames.Count > 0 Then Settings.BlackList.ListAddList(tmpUserNames.Select(Function(u) New UserBan(u, reason)), l) : b = True RemoveUserFromList(user) removedUsers.Add(ugn(user)) Else diff --git a/SCrawler/My Project/AssemblyInfo.vb b/SCrawler/My Project/AssemblyInfo.vb index f41e4c0..c1dbd3d 100644 --- a/SCrawler/My Project/AssemblyInfo.vb +++ b/SCrawler/My Project/AssemblyInfo.vb @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + +