diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index 468eb7e..981bac9 100644 Binary files a/.vs/Crunchyroll Downloader/v17/.suo and b/.vs/Crunchyroll Downloader/v17/.suo differ diff --git a/Crunchyroll Downloader/GetData.vb b/Crunchyroll Downloader/GetData.vb index 5ffd717..3177f8d 100644 --- a/Crunchyroll Downloader/GetData.vb +++ b/Crunchyroll Downloader/GetData.vb @@ -116,6 +116,10 @@ Module GetData If CBool(InStr(CurlOutput, "curl:")) = True And CBool(InStr(CurlOutput, "400")) = True Then Return CurlOutput + ElseIf CBool(InStr(CurlError, "curl:")) = True And CBool(InStr(CurlError, "401")) = True Then + Return CurlError + ElseIf CBool(InStr(CurlOutput, "curl:")) = True And CBool(InStr(CurlOutput, "401")) = True Then + Return CurlOutput ElseIf CBool(InStr(CurlError, "curl:")) = True And CBool(InStr(CurlError, "400")) = True Then Return CurlError ElseIf CBool(InStr(CurlError, "curl:")) Then diff --git a/Crunchyroll Downloader/LoginForm.Designer.vb b/Crunchyroll Downloader/LoginForm.Designer.vb index cb0adce..cf27fe3 100644 --- a/Crunchyroll Downloader/LoginForm.Designer.vb +++ b/Crunchyroll Downloader/LoginForm.Designer.vb @@ -24,13 +24,13 @@ Partial Class LoginForm Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Me.GroupBox3 = New System.Windows.Forms.GroupBox() + Me.Btn_Save = New System.Windows.Forms.Button() Me.Save = New MetroFramework.Controls.MetroCheckBox() Me.IssueLink = New MetroFramework.Controls.MetroLink() Me.PW = New MetroFramework.Controls.MetroTextBox() Me.Mail = New MetroFramework.Controls.MetroTextBox() Me.StatusLabel = New MetroFramework.Controls.MetroLabel() Me.Delay = New System.Windows.Forms.Timer(Me.components) - Me.Btn_Save = New System.Windows.Forms.Button() Me.GroupBox3.SuspendLayout() Me.SuspendLayout() ' @@ -49,6 +49,22 @@ Partial Class LoginForm Me.GroupBox3.TabIndex = 38 Me.GroupBox3.TabStop = False ' + 'Btn_Save + ' + Me.Btn_Save.BackColor = System.Drawing.Color.Transparent + Me.Btn_Save.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.Btn_Save.Cursor = System.Windows.Forms.Cursors.Hand + Me.Btn_Save.FlatAppearance.BorderSize = 0 + Me.Btn_Save.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent + Me.Btn_Save.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Btn_Save.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.DialogNotFound_Submit + Me.Btn_Save.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.Btn_Save.Location = New System.Drawing.Point(165, 246) + Me.Btn_Save.Name = "Btn_Save" + Me.Btn_Save.Size = New System.Drawing.Size(150, 40) + Me.Btn_Save.TabIndex = 3 + Me.Btn_Save.UseVisualStyleBackColor = False + ' 'Save ' Me.Save.AutoSize = True @@ -89,7 +105,7 @@ Partial Class LoginForm Me.PW.Location = New System.Drawing.Point(165, 140) Me.PW.MaxLength = 32767 Me.PW.Name = "PW" - Me.PW.PasswordChar = Global.Microsoft.VisualBasic.ChrW(9679) + Me.PW.PasswordChar = Global.Microsoft.VisualBasic.ChrW(42) Me.PW.ScrollBars = System.Windows.Forms.ScrollBars.None Me.PW.SelectedText = "" Me.PW.SelectionLength = 0 @@ -99,7 +115,6 @@ Partial Class LoginForm Me.PW.TabIndex = 1 Me.PW.Text = "Password" Me.PW.UseSelectable = True - Me.PW.UseSystemPasswordChar = True Me.PW.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer)) Me.PW.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel) ' @@ -155,22 +170,6 @@ Partial Class LoginForm ' Me.Delay.Interval = 2000 ' - 'Btn_Save - ' - Me.Btn_Save.BackColor = System.Drawing.Color.Transparent - Me.Btn_Save.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom - Me.Btn_Save.Cursor = System.Windows.Forms.Cursors.Hand - Me.Btn_Save.FlatAppearance.BorderSize = 0 - Me.Btn_Save.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent - Me.Btn_Save.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Btn_Save.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.DialogNotFound_Submit - Me.Btn_Save.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.Btn_Save.Location = New System.Drawing.Point(165, 246) - Me.Btn_Save.Name = "Btn_Save" - Me.Btn_Save.Size = New System.Drawing.Size(150, 40) - Me.Btn_Save.TabIndex = 3 - Me.Btn_Save.UseVisualStyleBackColor = False - ' 'LoginForm ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/Crunchyroll Downloader/LoginForm.vb b/Crunchyroll Downloader/LoginForm.vb index 04f9612..d4630dd 100644 --- a/Crunchyroll Downloader/LoginForm.vb +++ b/Crunchyroll Downloader/LoginForm.vb @@ -22,6 +22,18 @@ Public Class LoginForm Me.Location = New Point(CInt(Main.Location.X + Main.Width / 2 - Me.Width / 2), CInt(Main.Location.Y + Main.Height / 2 - Me.Height / 2)) 'MsgBox(CInt(Main.Location.X + Main.Width / 2 - Me.Width / 2).ToString) + + If My.Settings.Mail = "na" Then + Else + Mail.Text = My.Settings.Mail + Save.Checked = True + End If + If My.Settings.PW = "na" Then + Else + PW.Text = My.Settings.PW + 'PW.UseSystemPasswordChar = False + PW.PasswordChar = Nothing + End If End Sub Private Sub Btn_Save_Click(sender As Object, e As EventArgs) Handles Btn_Save.Click diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 7129bdb..f9511eb 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -3107,6 +3107,11 @@ Public Class Main Dim v1Token As String = CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post, "add_main_4494") + If CBool(InStr(v1Token, "curl:")) = True And CBool(InStr(v1Token, "401")) = True Then + MsgBox("CR reported error 401, this may mean incorrect login detail, please try again.", MsgBoxStyle.Exclamation, "CR-Error 401") + LoginForm.ShowDialog() + Exit Sub + End If If CBool(InStr(v1Token, "curl:")) = True And CBool(InStr(v1Token, "400")) = True Then Debug.WriteLine("Post error!, 400") diff --git a/Crunchyroll Downloader/My Project/AssemblyInfo.vb b/Crunchyroll Downloader/My Project/AssemblyInfo.vb index 62cc056..b58fd5b 100644 --- a/Crunchyroll Downloader/My Project/AssemblyInfo.vb +++ b/Crunchyroll Downloader/My Project/AssemblyInfo.vb @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + +