Skip to content

Commit

Permalink
2023.1.24.0
Browse files Browse the repository at this point in the history
Imgur albums not downloading
Collections: users in the collection are not banned
  • Loading branch information
AAndyProgram committed Jan 24, 2023
1 parent 3e472b4 commit 602771d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
8 changes: 8 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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*
Expand Down
9 changes: 5 additions & 4 deletions SCrawler/API/Imgur/Envir.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion SCrawler/MainFrame.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions SCrawler/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2023.1.2.0")>
<Assembly: AssemblyFileVersion("2023.1.2.0")>
<Assembly: AssemblyVersion("2023.1.24.0")>
<Assembly: AssemblyFileVersion("2023.1.24.0")>
<Assembly: NeutralResourcesLanguage("en")>

0 comments on commit 602771d

Please sign in to comment.