0.9.9.11
This commit is contained in:
AiiR 2020-03-25 15:01:33 -04:00
parent 8f8a01fddd
commit 7c6b826c77
6 changed files with 2342 additions and 79 deletions

View File

@ -101,6 +101,8 @@
this.logoutLabel = new System.Windows.Forms.Label(); this.logoutLabel = new System.Windows.Forms.Label();
this.downloadLabelBG = new System.ComponentModel.BackgroundWorker(); this.downloadLabelBG = new System.ComponentModel.BackgroundWorker();
this.hiddenTextPanel = new System.Windows.Forms.Panel(); this.hiddenTextPanel = new System.Windows.Forms.Panel();
this.downloadFaveAlbumsBG = new System.ComponentModel.BackgroundWorker();
this.downloadFaveArtistsBG = new System.ComponentModel.BackgroundWorker();
((System.ComponentModel.ISupportInitialize)(this.albumArtPicBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.albumArtPicBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.logoBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.logoBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.profilePictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.profilePictureBox)).BeginInit();
@ -927,6 +929,14 @@
this.hiddenTextPanel.TabIndex = 87; this.hiddenTextPanel.TabIndex = 87;
this.hiddenTextPanel.Visible = false; this.hiddenTextPanel.Visible = false;
// //
// downloadFaveAlbumsBG
//
this.downloadFaveAlbumsBG.DoWork += new System.ComponentModel.DoWorkEventHandler(this.downloadFaveAlbumsBG_DoWork);
//
// downloadFaveArtistsBG
//
this.downloadFaveArtistsBG.DoWork += new System.ComponentModel.DoWorkEventHandler(this.downloadFaveArtistsBG_DoWork);
//
// QobuzDownloaderX // QobuzDownloaderX
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1088,6 +1098,8 @@
private System.Windows.Forms.Label logoutLabel; private System.Windows.Forms.Label logoutLabel;
private System.ComponentModel.BackgroundWorker downloadLabelBG; private System.ComponentModel.BackgroundWorker downloadLabelBG;
private System.Windows.Forms.Panel hiddenTextPanel; private System.Windows.Forms.Panel hiddenTextPanel;
private System.ComponentModel.BackgroundWorker downloadFaveAlbumsBG;
private System.ComponentModel.BackgroundWorker downloadFaveArtistsBG;
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -138,6 +138,12 @@
<metadata name="downloadLabelBG.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="downloadLabelBG.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>901, 13</value> <value>901, 13</value>
</metadata> </metadata>
<metadata name="downloadFaveAlbumsBG.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1065, 13</value>
</metadata>
<metadata name="downloadFaveArtistsBG.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1229, 13</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>

View File

@ -30,6 +30,7 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginFrm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginFrm));
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.disableLogin = new System.Windows.Forms.CheckBox();
this.verNumLabel2 = new System.Windows.Forms.Label(); this.verNumLabel2 = new System.Windows.Forms.Label();
this.exitLabel = new System.Windows.Forms.Label(); this.exitLabel = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
@ -43,7 +44,6 @@
this.getSecretBG = new System.ComponentModel.BackgroundWorker(); this.getSecretBG = new System.ComponentModel.BackgroundWorker();
this.loginBG = new System.ComponentModel.BackgroundWorker(); this.loginBG = new System.ComponentModel.BackgroundWorker();
this.visableCheckbox = new System.Windows.Forms.CheckBox(); this.visableCheckbox = new System.Windows.Forms.CheckBox();
this.disableLogin = new System.Windows.Forms.CheckBox();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
@ -53,6 +53,7 @@
this.panel1.BackgroundImage = global::QobuzDownloaderX.Properties.Resources.login_frame; this.panel1.BackgroundImage = global::QobuzDownloaderX.Properties.Resources.login_frame;
this.panel1.Controls.Add(this.disableLogin); this.panel1.Controls.Add(this.disableLogin);
this.panel1.Controls.Add(this.verNumLabel2); this.panel1.Controls.Add(this.verNumLabel2);
this.panel1.Controls.Add(this.md5Button);
this.panel1.Controls.Add(this.exitLabel); this.panel1.Controls.Add(this.exitLabel);
this.panel1.Controls.Add(this.pictureBox1); this.panel1.Controls.Add(this.pictureBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
@ -62,6 +63,18 @@
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseMove); this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseMove);
// //
// disableLogin
//
this.disableLogin.AutoSize = true;
this.disableLogin.ForeColor = System.Drawing.Color.Transparent;
this.disableLogin.Location = new System.Drawing.Point(12, 155);
this.disableLogin.Name = "disableLogin";
this.disableLogin.Size = new System.Drawing.Size(90, 17);
this.disableLogin.TabIndex = 34;
this.disableLogin.Text = "Disable Login";
this.disableLogin.UseVisualStyleBackColor = true;
this.disableLogin.Visible = false;
//
// verNumLabel2 // verNumLabel2
// //
this.verNumLabel2.BackColor = System.Drawing.Color.Transparent; this.verNumLabel2.BackColor = System.Drawing.Color.Transparent;
@ -167,16 +180,18 @@
// md5Button // md5Button
// //
this.md5Button.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(112)))), ((int)(((byte)(239))))); this.md5Button.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(112)))), ((int)(((byte)(239)))));
this.md5Button.Enabled = false;
this.md5Button.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); this.md5Button.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.md5Button.FlatAppearance.BorderSize = 2; this.md5Button.FlatAppearance.BorderSize = 2;
this.md5Button.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.md5Button.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.md5Button.ForeColor = System.Drawing.Color.White; this.md5Button.ForeColor = System.Drawing.Color.White;
this.md5Button.Location = new System.Drawing.Point(227, 250); this.md5Button.Location = new System.Drawing.Point(227, 122);
this.md5Button.Name = "md5Button"; this.md5Button.Name = "md5Button";
this.md5Button.Size = new System.Drawing.Size(43, 27); this.md5Button.Size = new System.Drawing.Size(43, 27);
this.md5Button.TabIndex = 9; this.md5Button.TabIndex = 9;
this.md5Button.Text = "MD5"; this.md5Button.Text = "MD5";
this.md5Button.UseVisualStyleBackColor = false; this.md5Button.UseVisualStyleBackColor = false;
this.md5Button.Visible = false;
this.md5Button.Click += new System.EventHandler(this.md5Button_Click); this.md5Button.Click += new System.EventHandler(this.md5Button_Click);
// //
// loginText // loginText
@ -201,25 +216,13 @@
// visableCheckbox // visableCheckbox
// //
this.visableCheckbox.AutoSize = true; this.visableCheckbox.AutoSize = true;
this.visableCheckbox.Location = new System.Drawing.Point(206, 257); this.visableCheckbox.Location = new System.Drawing.Point(255, 256);
this.visableCheckbox.Name = "visableCheckbox"; this.visableCheckbox.Name = "visableCheckbox";
this.visableCheckbox.Size = new System.Drawing.Size(15, 14); this.visableCheckbox.Size = new System.Drawing.Size(15, 14);
this.visableCheckbox.TabIndex = 31; this.visableCheckbox.TabIndex = 31;
this.visableCheckbox.UseVisualStyleBackColor = true; this.visableCheckbox.UseVisualStyleBackColor = true;
this.visableCheckbox.CheckedChanged += new System.EventHandler(this.visableCheckbox_CheckedChanged); this.visableCheckbox.CheckedChanged += new System.EventHandler(this.visableCheckbox_CheckedChanged);
// //
// disableLogin
//
this.disableLogin.AutoSize = true;
this.disableLogin.ForeColor = System.Drawing.Color.Transparent;
this.disableLogin.Location = new System.Drawing.Point(12, 155);
this.disableLogin.Name = "disableLogin";
this.disableLogin.Size = new System.Drawing.Size(90, 17);
this.disableLogin.TabIndex = 34;
this.disableLogin.Text = "Disable Login";
this.disableLogin.UseVisualStyleBackColor = true;
this.disableLogin.Visible = false;
//
// LoginFrm // LoginFrm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -228,7 +231,6 @@
this.ClientSize = new System.Drawing.Size(282, 377); this.ClientSize = new System.Drawing.Size(282, 377);
this.Controls.Add(this.visableCheckbox); this.Controls.Add(this.visableCheckbox);
this.Controls.Add(this.loginText); this.Controls.Add(this.loginText);
this.Controls.Add(this.md5Button);
this.Controls.Add(this.panel4); this.Controls.Add(this.panel4);
this.Controls.Add(this.panel3); this.Controls.Add(this.panel3);
this.Controls.Add(this.passwordTextbox); this.Controls.Add(this.passwordTextbox);

View File

@ -192,12 +192,6 @@ namespace QobuzDownloaderX
private void loginButton_Click(object sender, EventArgs e) private void loginButton_Click(object sender, EventArgs e)
{ {
//if (appidTextbox.Text == "app_id" | appidTextbox.Text == null | appidTextbox.Text == "")
//{
// // If there's no app_id typed in.
// loginText.Invoke(new Action(() => loginText.Text = "No app_id, please input app_id first."));
// return;
//}
if (emailTextbox.Text == "Email" | emailTextbox.Text == null | emailTextbox.Text == "") if (emailTextbox.Text == "Email" | emailTextbox.Text == null | emailTextbox.Text == "")
{ {
// If there's no email typed in. // If there's no email typed in.
@ -205,13 +199,37 @@ namespace QobuzDownloaderX
return; return;
} }
var passMD5CheckLog = Regex.Match(passwordTextbox.Text, "(?<md5Test>^[0-9a-f]{32}$)").Groups; if (passwordTextbox.Text == "Password")
{
// If there's no password typed in.
loginText.Invoke(new Action(() => loginText.Text = "No password typed, please input password first."));
return;
}
string plainTextPW = passwordTextbox.Text;
var passMD5CheckLog = Regex.Match(plainTextPW, "(?<md5Test>^[0-9a-f]{32}$)").Groups;
var passMD5Check = passMD5CheckLog[1].Value; var passMD5Check = passMD5CheckLog[1].Value;
if (passMD5Check == null | passMD5Check == "") if (passMD5Check == null | passMD5Check == "")
{ {
loginText.Text = "Password not MD5! Hit \"MD5\" before logging in!"; // Generate the MD5 hash using the string created above.
return; using (MD5 md5PassHash = MD5.Create())
{
string hashedPW = GetMd5Hash(md5PassHash, plainTextPW);
if (VerifyMd5Hash(md5PassHash, plainTextPW, hashedPW))
{
// If the MD5 hash is verified, proceed to get the streaming URL.
passwordTextbox.Text = hashedPW;
}
else
{
// If the hash can't be verified.
loginText.Invoke(new Action(() => loginText.Text = "Hashing failed. Please retry."));
return;
}
}
} }
// Save info locally to be used on next launch. // Save info locally to be used on next launch.
@ -373,32 +391,32 @@ namespace QobuzDownloaderX
private void md5Button_Click(object sender, EventArgs e) private void md5Button_Click(object sender, EventArgs e)
{ {
if (passwordTextbox.Text == "Password") //if (passwordTextbox.Text == "Password")
{ //{
// If there's no password typed in. // // If there's no password typed in.
loginText.Invoke(new Action(() => loginText.Text = "No password typed, please input password first.")); // loginText.Invoke(new Action(() => loginText.Text = "No password typed, please input password first."));
return; // return;
} //}
string plainTextPW = passwordTextbox.Text; //string plainTextPW = passwordTextbox.Text;
// Generate the MD5 hash using the string created above. //// Generate the MD5 hash using the string created above.
using (MD5 md5PassHash = MD5.Create()) //using (MD5 md5PassHash = MD5.Create())
{ //{
string hashedPW = GetMd5Hash(md5PassHash, plainTextPW); // string hashedPW = GetMd5Hash(md5PassHash, plainTextPW);
if (VerifyMd5Hash(md5PassHash, plainTextPW, hashedPW)) // if (VerifyMd5Hash(md5PassHash, plainTextPW, hashedPW))
{ // {
// If the MD5 hash is verified, proceed to get the streaming URL. // // If the MD5 hash is verified, proceed to get the streaming URL.
passwordTextbox.Text = hashedPW; // passwordTextbox.Text = hashedPW;
} // }
else // else
{ // {
// If the hash can't be verified. // // If the hash can't be verified.
loginText.Invoke(new Action(() => loginText.Text = "Hashing failed. Please retry.")); // loginText.Invoke(new Action(() => loginText.Text = "Hashing failed. Please retry."));
return; // return;
} // }
} //}
} }
private void getSecretBG_DoWork(object sender, DoWorkEventArgs e) private void getSecretBG_DoWork(object sender, DoWorkEventArgs e)
@ -486,6 +504,11 @@ namespace QobuzDownloaderX
string loginRequest = sr.ReadToEnd(); string loginRequest = sr.ReadToEnd();
string text = loginRequest; string text = loginRequest;
// Grab user_id
var userIDLog = Regex.Match(loginRequest, "{\"user\":{\"id\":(?<userID>.*?),\"publicId").Groups;
var userID = userIDLog[1].Value;
qbdlx.userID = userID;
// Grab display name // Grab display name
var displayNameLog = Regex.Match(loginRequest, "\"display_name\":\"(?<displayName>.*?)\",\\\"").Groups; var displayNameLog = Regex.Match(loginRequest, "\"display_name\":\"(?<displayName>.*?)\",\\\"").Groups;
var displayName = displayNameLog[1].Value; var displayName = displayNameLog[1].Value;

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.9.10")] [assembly: AssemblyVersion("0.9.9.11")]
[assembly: AssemblyFileVersion("0.9.9.10")] [assembly: AssemblyFileVersion("0.9.9.11")]