Sign-in video login bug
Closed this issue ยท 22 comments
YTDAuthentication
username and password accepts null or empty
But the LoginWindow closes after OK btn is clicked.
It doesn't for me. It only closes when username and password fields is not empty.
Maybe you're thinking about Two Factor? That is optional, so it can be empty.
It throws the error properly for me but the loginwindow exits
Does it throw this error:
throw new Exception($"{this.GetType().Name}: {nameof(username)} and {nameof(password)} can't be empty or null.");
Or the red line of text above the buttons?
the exception windows appears but when i click continue button the loginwindow disappears
Can you check if your local LoginDialog.cs file is up to date?
It should have a private void btnOK_Click(object sender, EventArgs e)
which does a null check. You shouldn't be seeing that window.
yup its there!
but i have problem here
`if (videoInfo.RequiresAuthentication)
{
var auth = Dialogs.LoginDialog.Show(this);
if (auth != null)
{
_auth = auth;
btnGetVideo_Click(bwGetVideo, EventArgs.Empty);
return;
}
}
else if (videoInfo.Failure)
{
MessageBox.Show(this, "Couldn't retrieve video. Reason:\n\n" + videoInfo.FailureReason);
}`
the login windows does not appear but when i make it this way the login windows appears
`if (videoInfo.RequiresAuthentication||videoInfo.Failure)
{
var auth = Dialogs.LoginDialog.Show(this);
if (auth != null)
{
_auth = auth;
btnGetVideo_Click(bwGetVideo, EventArgs.Empty);
return;
}
}
else if (videoInfo.Failure)
{
MessageBox.Show(this, "Couldn't retrieve video. Reason:\n\n" + videoInfo.FailureReason);
}`
Hmm, this makes no sense.
Can you also check if you have this line in your local LoginDialog.Designer.cs
Line 97: this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
to make sure the event handler is actually being used.
yes i have it
the blocked video requires sign-in to confirm age
yes i solved the whole thing ๐
just changed btnOK.DialogResult to None by default
Good ๐
I added a check for age gated content, so login should prompt for that also now. I didn't notice it since the error just says it's blocked, nothing about being age gated.
are you working on the feature max no. of queues to download at a time?
Yeah I am. I have a branch on my computer where I'm working on it. It just takes a while since I have to rework quite a lot of stuff.
hmmmm. ๐