diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo
index 3bc6069..468eb7e 100644
Binary files a/.vs/Crunchyroll Downloader/v17/.suo and b/.vs/Crunchyroll Downloader/v17/.suo differ
diff --git a/Crunchyroll Downloader/Anime_Add.vb b/Crunchyroll Downloader/Anime_Add.vb
index cd5a790..7e1c6d5 100644
--- a/Crunchyroll Downloader/Anime_Add.vb
+++ b/Crunchyroll Downloader/Anime_Add.vb
@@ -44,6 +44,16 @@ Public Class Anime_Add
Private Sub Anime_Add_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ If Main.Mail = Nothing And My.Settings.Mail = "na" Then
+ 'Dim Login As Form = LoginForm
+ 'Login.StartPosition = 0
+ 'Login.Location = New Point(CInt(Main.Location.X + Main.Width / 2 - Me.Width / 2), CInt(Main.Location.Y + Main.Height / 2 - Me.Height / 2))
+ LoginForm.ShowDialog()
+ ElseIf Main.Mail = Nothing Then
+ Main.Mail = My.Settings.Mail
+ Main.PW = My.Settings.PW
+ End If
+
DownloadScope.SelectedIndex = Main.DownloadScope
Manager.Owner = Me
diff --git a/Crunchyroll Downloader/App.config b/Crunchyroll Downloader/App.config
index eb77e30..7c09376 100644
--- a/Crunchyroll Downloader/App.config
+++ b/Crunchyroll Downloader/App.config
@@ -156,6 +156,12 @@
True
+
+ na
+
+
+ na
+
diff --git a/Crunchyroll Downloader/Crunchyroll Downloader.vbproj b/Crunchyroll Downloader/Crunchyroll Downloader.vbproj
index 978ebce..469d13c 100644
--- a/Crunchyroll Downloader/Crunchyroll Downloader.vbproj
+++ b/Crunchyroll Downloader/Crunchyroll Downloader.vbproj
@@ -151,6 +151,12 @@
+
+ LoginForm.vb
+
+
+ Form
+
ffmpeg_option.vb
@@ -234,6 +240,9 @@
+
+ LoginForm.vb
+
ffmpeg_option.vb
diff --git a/Crunchyroll Downloader/LoginForm.Designer.vb b/Crunchyroll Downloader/LoginForm.Designer.vb
new file mode 100644
index 0000000..cb0adce
--- /dev/null
+++ b/Crunchyroll Downloader/LoginForm.Designer.vb
@@ -0,0 +1,196 @@
+
+Partial Class LoginForm
+ Inherits MetroFramework.Forms.MetroForm
+
+ 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
+
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
+
+ 'Wird vom Windows Form-Designer benötigt.
+ Private components As System.ComponentModel.IContainer
+
+ 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
+ 'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
+ 'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
+
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container()
+ Me.GroupBox3 = New System.Windows.Forms.GroupBox()
+ 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()
+ '
+ 'GroupBox3
+ '
+ Me.GroupBox3.BackColor = System.Drawing.Color.Transparent
+ Me.GroupBox3.Controls.Add(Me.Btn_Save)
+ Me.GroupBox3.Controls.Add(Me.Save)
+ Me.GroupBox3.Controls.Add(Me.IssueLink)
+ Me.GroupBox3.Controls.Add(Me.PW)
+ Me.GroupBox3.Controls.Add(Me.Mail)
+ Me.GroupBox3.Controls.Add(Me.StatusLabel)
+ Me.GroupBox3.Location = New System.Drawing.Point(13, 60)
+ Me.GroupBox3.Name = "GroupBox3"
+ Me.GroupBox3.Size = New System.Drawing.Size(480, 308)
+ Me.GroupBox3.TabIndex = 38
+ Me.GroupBox3.TabStop = False
+ '
+ 'Save
+ '
+ Me.Save.AutoSize = True
+ Me.Save.FontSize = MetroFramework.MetroCheckBoxSize.Medium
+ Me.Save.Location = New System.Drawing.Point(177, 203)
+ Me.Save.Name = "Save"
+ Me.Save.Size = New System.Drawing.Size(129, 19)
+ Me.Save.TabIndex = 2
+ Me.Save.Text = "Remember Login"
+ Me.Save.UseSelectable = True
+ '
+ 'IssueLink
+ '
+ Me.IssueLink.FontSize = MetroFramework.MetroLinkSize.Medium
+ Me.IssueLink.Location = New System.Drawing.Point(166, 72)
+ Me.IssueLink.Name = "IssueLink"
+ Me.IssueLink.Size = New System.Drawing.Size(149, 23)
+ Me.IssueLink.TabIndex = 41
+ Me.IssueLink.Text = "See here: Github"
+ Me.IssueLink.UseSelectable = True
+ '
+ 'PW
+ '
+ '
+ '
+ '
+ Me.PW.CustomButton.Image = Nothing
+ Me.PW.CustomButton.Location = New System.Drawing.Point(138, 1)
+ Me.PW.CustomButton.Name = ""
+ Me.PW.CustomButton.Size = New System.Drawing.Size(21, 21)
+ Me.PW.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
+ Me.PW.CustomButton.TabIndex = 1
+ Me.PW.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
+ Me.PW.CustomButton.UseSelectable = True
+ Me.PW.CustomButton.Visible = False
+ Me.PW.FontSize = MetroFramework.MetroTextBoxSize.Medium
+ Me.PW.Lines = New String() {"Password"}
+ 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.ScrollBars = System.Windows.Forms.ScrollBars.None
+ Me.PW.SelectedText = ""
+ Me.PW.SelectionLength = 0
+ Me.PW.SelectionStart = 0
+ Me.PW.ShortcutsEnabled = True
+ Me.PW.Size = New System.Drawing.Size(160, 23)
+ 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)
+ '
+ 'Mail
+ '
+ '
+ '
+ '
+ Me.Mail.CustomButton.Image = Nothing
+ Me.Mail.CustomButton.Location = New System.Drawing.Point(138, 1)
+ Me.Mail.CustomButton.Name = ""
+ Me.Mail.CustomButton.Size = New System.Drawing.Size(21, 21)
+ Me.Mail.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
+ Me.Mail.CustomButton.TabIndex = 1
+ Me.Mail.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
+ Me.Mail.CustomButton.UseSelectable = True
+ Me.Mail.CustomButton.Visible = False
+ Me.Mail.FontSize = MetroFramework.MetroTextBoxSize.Medium
+ Me.Mail.Lines = New String() {"E-Mail"}
+ Me.Mail.Location = New System.Drawing.Point(165, 101)
+ Me.Mail.MaxLength = 32767
+ Me.Mail.Name = "Mail"
+ Me.Mail.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
+ Me.Mail.ScrollBars = System.Windows.Forms.ScrollBars.None
+ Me.Mail.SelectedText = ""
+ Me.Mail.SelectionLength = 0
+ Me.Mail.SelectionStart = 0
+ Me.Mail.ShortcutsEnabled = True
+ Me.Mail.Size = New System.Drawing.Size(160, 23)
+ Me.Mail.TabIndex = 0
+ Me.Mail.Text = "E-Mail"
+ Me.Mail.UseSelectable = True
+ Me.Mail.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
+ Me.Mail.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
+ '
+ 'StatusLabel
+ '
+ Me.StatusLabel.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
+ Or System.Windows.Forms.AnchorStyles.Left) _
+ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+ Me.StatusLabel.BackColor = System.Drawing.Color.Transparent
+ Me.StatusLabel.FontSize = MetroFramework.MetroLabelSize.Tall
+ Me.StatusLabel.FontWeight = MetroFramework.MetroLabelWeight.Regular
+ Me.StatusLabel.ForeColor = System.Drawing.Color.Black
+ Me.StatusLabel.Location = New System.Drawing.Point(6, 16)
+ Me.StatusLabel.Name = "StatusLabel"
+ Me.StatusLabel.Size = New System.Drawing.Size(468, 53)
+ Me.StatusLabel.TabIndex = 34
+ Me.StatusLabel.Text = "For the changed switch API i need the direct login now"
+ Me.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
+ '
+ 'Delay
+ '
+ 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!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(507, 379)
+ Me.Controls.Add(Me.GroupBox3)
+ Me.Name = "LoginForm"
+ Me.Text = "CRD-Login"
+ Me.TextAlign = MetroFramework.Forms.MetroFormTextAlign.Center
+ Me.GroupBox3.ResumeLayout(False)
+ Me.GroupBox3.PerformLayout()
+ Me.ResumeLayout(False)
+
+ End Sub
+ Private WithEvents GroupBox3 As GroupBox
+ Public WithEvents StatusLabel As MetroFramework.Controls.MetroLabel
+ Friend WithEvents Delay As Timer
+ Friend WithEvents PW As MetroFramework.Controls.MetroTextBox
+ Friend WithEvents Mail As MetroFramework.Controls.MetroTextBox
+ Friend WithEvents IssueLink As MetroFramework.Controls.MetroLink
+ Friend WithEvents Save As MetroFramework.Controls.MetroCheckBox
+ Friend WithEvents Btn_Save As Button
+End Class
diff --git a/Crunchyroll Downloader/LoginForm.resx b/Crunchyroll Downloader/LoginForm.resx
new file mode 100644
index 0000000..2c036a2
--- /dev/null
+++ b/Crunchyroll Downloader/LoginForm.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/Crunchyroll Downloader/LoginForm.vb b/Crunchyroll Downloader/LoginForm.vb
new file mode 100644
index 0000000..04f9612
--- /dev/null
+++ b/Crunchyroll Downloader/LoginForm.vb
@@ -0,0 +1,66 @@
+Option Strict On
+Imports Crunchyroll_Downloader.CRD_Classes
+Imports MetroFramework.Components
+
+Public Class LoginForm
+
+ Dim Manager As MetroStyleManager = Main.Manager
+
+
+ Private Sub Reso_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ 'Me.TopMost = True
+ Manager.Owner = Me
+ Me.StyleManager = Manager
+
+
+ Me.StartPosition = 0
+ Try
+ Me.Icon = My.Resources.icon
+ Catch ex As Exception
+
+ End Try
+
+ 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)
+ End Sub
+
+ Private Sub Btn_Save_Click(sender As Object, e As EventArgs) Handles Btn_Save.Click
+ If PW.Text = "Password" Or Mail.Text = "E-Mail" Then
+ MsgBox("Invalid Input", MsgBoxStyle.Information)
+ Exit Sub
+ ElseIf Save.Checked = True Then
+ My.Settings.Mail = Mail.Text
+ My.Settings.PW = PW.Text
+ End If
+ Main.PW = PW.Text
+ Main.Mail = Mail.Text
+ Me.Close()
+ End Sub
+
+ Private Sub Submit_MouseEnter(sender As Object, e As EventArgs) Handles Btn_Save.MouseEnter
+ Btn_Save.Image = My.Resources.DialogNotFound_Submit_hover
+ End Sub
+
+ Private Sub Submit_MouseLeave(sender As Object, e As EventArgs) Handles Btn_Save.MouseLeave
+ Btn_Save.Image = My.Resources.DialogNotFound_Submit
+ End Sub
+
+
+ Private Sub MetroLink1_Click(sender As Object, e As EventArgs) Handles IssueLink.Click
+ Process.Start("https://github.com/hama3254/Crunchyroll-Downloader-v3.0/issues/938#issuecomment-2067383212")
+ End Sub
+
+ Private Sub PW_Click(sender As Object, e As EventArgs) Handles PW.Click
+ If PW.Text = "Password" Then
+ PW.Text = Nothing
+ End If
+ End Sub
+
+ Private Sub Mail_Click(sender As Object, e As EventArgs) Handles Mail.Click
+ If Mail.Text = "E-Mail" Then
+ Mail.Text = Nothing
+ End If
+ End Sub
+
+
+End Class
\ No newline at end of file
diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb
index a5fb400..7129bdb 100644
--- a/Crunchyroll Downloader/Main.vb
+++ b/Crunchyroll Downloader/Main.vb
@@ -42,7 +42,10 @@ Public Class Main
'Public CrBetaMassParameters As String = Nothing
'Public CrBetaMassBaseURL As String = Nothing
- Public CrBetaBasic As String = Nothing
+
+ Public Mail As String = Nothing
+ Public PW As String = Nothing
+ Public CrBetaBasic As String = "Basic dC1rZGdwMmg4YzNqdWI4Zm4wZnE6eWZMRGZNZnJZdktYaDRKWFMxTEVJMmNDcXUxdjVXYW4="
Public locale As String = Nothing
Public Url_locale As String = Nothing
'Public CrBetaObjects As String = Nothing
@@ -505,7 +508,7 @@ Public Class Main
Reso = My.Settings.Reso
If Reso = 42 Then
- MsgBox("Resolution [Auto] is no longer supportet." + vbNewLine + "Please select a valid Resolution inside the settings.", MsgBoxStyle.Information)
+ MsgBox("Resolution [Auto] is no longer supported." + vbNewLine + "Please select a valid Resolution inside the settings.", MsgBoxStyle.Information)
End If
LeadingZero = My.Settings.LeadingZero
@@ -3095,8 +3098,10 @@ Public Class Main
#End Region
Dim Auth As String = " -H " + Chr(34) + "Authorization: " + CrBetaBasic + Chr(34)
- Dim Post As String = " -d " + Chr(34) + "grant_type=etp_rt_cookie" + Chr(34) + " -X POST"
+ 'Dim Post As String = " -d " + Chr(34) + "grant_type=etp_rt_cookie" + Chr(34) + " -X POST"
+ Dim Post As String = " -d " + Chr(34) + "username=" + Mail + "&password=" + PW + "&grant_type=password&scope=offline_access" + Chr(34) + " -X POST"
+ '
Dim CRBetaBearer As String = "Bearer "
@@ -3105,6 +3110,8 @@ Public Class Main
If CBool(InStr(v1Token, "curl:")) = True And CBool(InStr(v1Token, "400")) = True Then
Debug.WriteLine("Post error!, 400")
+ Post = " -d " + Chr(34) + "grant_type=client_id&scope=offline_access" + Chr(34) + " -X POST"
+
Debug.WriteLine(Post.Replace("etp_rt_cookie", "client_id"))
v1Token = CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post.Replace("etp_rt_cookie", "client_id"), "add_main-4499")
diff --git a/Crunchyroll Downloader/My Project/Settings.Designer.vb b/Crunchyroll Downloader/My Project/Settings.Designer.vb
index 0aff867..ef1efb6 100644
--- a/Crunchyroll Downloader/My Project/Settings.Designer.vb
+++ b/Crunchyroll Downloader/My Project/Settings.Designer.vb
@@ -594,6 +594,30 @@ Namespace My
Me("FixCRStream") = value
End Set
End Property
+
+ _
+ Public Property Mail() As String
+ Get
+ Return CType(Me("Mail"),String)
+ End Get
+ Set
+ Me("Mail") = value
+ End Set
+ End Property
+
+ _
+ Public Property PW() As String
+ Get
+ Return CType(Me("PW"),String)
+ End Get
+ Set
+ Me("PW") = value
+ End Set
+ End Property
End Class
End Namespace
diff --git a/Crunchyroll Downloader/My Project/Settings.settings b/Crunchyroll Downloader/My Project/Settings.settings
index 54ec253..8bf6289 100644
--- a/Crunchyroll Downloader/My Project/Settings.settings
+++ b/Crunchyroll Downloader/My Project/Settings.settings
@@ -137,5 +137,11 @@
True
+
+ na
+
+
+ na
+
\ No newline at end of file