Skip to content
This repository has been archived by the owner on Jul 13, 2024. It is now read-only.

Commit

Permalink
hotfix curl output
Browse files Browse the repository at this point in the history
hotfix curl output
  • Loading branch information
hama3254 committed May 23, 2024
1 parent ad4d869 commit ca18ed8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Binary file modified .vs/Crunchyroll Downloader/v17/.suo
Binary file not shown.
10 changes: 7 additions & 3 deletions Crunchyroll Downloader/GetData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,14 @@ Module GetData
If CurlOutput = Nothing And CurlError = Nothing Then
Throw New System.Exception("Error - Getting" + Sender + vbNewLine + CurlError)
Return Nothing
ElseIf CBool(InStr(CurlOutput, "HTTP Status: 4")) Then
Return CurlOutput
ElseIf CBool(InStr(CurlError, "HTTP Status: 4")) Then
Return CurlError
ElseIf CurlError = Nothing Then
Dim OutputBody() As String = CurlOutput.Split(New String() {"HTTP Status:"}, System.StringSplitOptions.RemoveEmptyEntries)
Return OutputBody(0)
'Return CurlOutput
Dim Output As String = OutputBody(0)
Return Output
Else
Return CurlError
End If
Expand Down Expand Up @@ -261,7 +265,7 @@ Module GetData
Return Nothing
ElseIf CBool(InStr(CurlOutput, "HTTP Status: 4")) Then
Debug.WriteLine(CurlOutput)
Throw New System.Exception("Error - Getting" + vbNewLine + CurlError)
Throw New System.Exception("Error - Getting" + vbNewLine + CurlOutput)
Return Nothing
Else
Return CurlOutput
Expand Down
4 changes: 2 additions & 2 deletions Crunchyroll Downloader/Main.vb
Original file line number Diff line number Diff line change
Expand Up @@ -3042,7 +3042,7 @@ Public Class Main
ProcessLoading(Url, Auth2, Loc_CR_Cookies, RT_count)
Else
Dim v1Token As String = CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post, "add_main_4494")

'MsgBox(v1Token)
If CBool(InStr(v1Token, "HTTP Status: 401")) = True Then
MsgBox("CR reported :" + vbNewLine + v1Token, MsgBoxStyle.Exclamation, "CR-Error 401")
LoginForm.ShowDialog()
Expand Down Expand Up @@ -3154,7 +3154,7 @@ Public Class Main

Exit Sub
ElseIf CBool(InStr(ObjectJson, "videos/")) = False Then
MsgBox(ObjectJson)
'MsgBox(ObjectJson)
SetStatusLabel("Status: Failed - no video, check CR login")
Me.Text = "Status: Failed - no video, check CR login"
Debug.WriteLine("Status: Failed - no video, check CR login")
Expand Down

0 comments on commit ca18ed8

Please sign in to comment.