Fix (#548)
This commit is contained in:
parent
fc6f494f0d
commit
397a516dc1
11 changed files with 60 additions and 10 deletions
|
|
@ -37,6 +37,12 @@ namespace LibationWinForms.Dialogs.Login
|
|||
Email = accountId;
|
||||
Password = this.passwordTb.Text;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(Password))
|
||||
{
|
||||
MessageBox.Show("Please enter your password");
|
||||
return;
|
||||
}
|
||||
|
||||
Serilog.Log.Logger.Information("Submit button clicked: {@DebugInfo}", new { email = Email?.ToMask(), passwordLength = Password.Length });
|
||||
|
||||
LoginMethod = AudibleApi.LoginMethod.Api;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace LibationWinForms.Login
|
|||
{
|
||||
using var dialog = new LoginChoiceEagerDialog(_account);
|
||||
|
||||
if (!ShowDialog(dialog))
|
||||
if (!ShowDialog(dialog) || string.IsNullOrWhiteSpace(dialog.Password))
|
||||
return null;
|
||||
|
||||
switch (dialog.LoginMethod)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,11 @@ namespace LibationWinForms
|
|||
else
|
||||
await importAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
Serilog.Log.Information("Audible login attempt cancelled by user");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Serilog.Log.Logger.Error(ex, "Error invoking auto-scan");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,10 @@ namespace LibationWinForms
|
|||
if (Configuration.Instance.ShowImportedStats && newAdded > 0)
|
||||
MessageBox.Show($"Total processed: {totalProcessed}\r\nNew: {newAdded}");
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
Serilog.Log.Information("Audible login attempt cancelled by user");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBoxLib.ShowAdminAlert(
|
||||
|
|
|
|||
|
|
@ -288,6 +288,10 @@ namespace LibationWinForms.GridView
|
|||
|
||||
productsGrid_RemovableCountChanged(this, null);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
Serilog.Log.Information("Audible login attempt cancelled by user");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBoxLib.ShowAdminAlert(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue