Fixed migration logic.
This commit is contained in:
parent
8d70d2a95f
commit
919175cc10
1 changed files with 6 additions and 3 deletions
|
|
@ -237,16 +237,19 @@ namespace LibationLauncher
|
|||
|
||||
var accountsPersister = AudibleApiStorage.GetAccountsSettingsPersister();
|
||||
|
||||
foreach (var account in accountsPersister.AccountsSettings.Accounts)
|
||||
foreach (var account in accountsPersister?.AccountsSettings?.Accounts)
|
||||
{
|
||||
var identity = account.IdentityTokens;
|
||||
var identity = account?.IdentityTokens;
|
||||
|
||||
if (identity is null)
|
||||
continue;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(identity.DeviceType) &&
|
||||
!string.IsNullOrWhiteSpace(identity.DeviceSerialNumber) &&
|
||||
!string.IsNullOrWhiteSpace(identity.AmazonAccountId))
|
||||
continue;
|
||||
|
||||
var authorize = new AudibleApi.Authorization.Authorize(identity?.Locale);
|
||||
var authorize = new AudibleApi.Authorization.Authorize(identity.Locale);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue