diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj
index 111fd6f3..954b0922 100644
--- a/LibationLauncher/LibationLauncher.csproj
+++ b/LibationLauncher/LibationLauncher.csproj
@@ -13,7 +13,7 @@
win-x64
- 3.1.11.10
+ 3.1.11.11
diff --git a/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.cs b/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.cs
index ddc1edc7..eab34583 100644
--- a/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.cs
+++ b/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.cs
@@ -77,8 +77,23 @@ namespace LibationWinForms.Dialogs
private void saveBtn_Click(object sender, EventArgs e)
{
- config.DecryptKey = this.decryptKeyTb.Text;
- config.LocaleCountryCode = this.audibleLocaleCb.Text;
+ var origLocale = config.LocaleCountryCode;
+ var newLocale = this.audibleLocaleCb.Text;
+
+ if (origLocale == newLocale)
+ {
+ config.DecryptKey = this.decryptKeyTb.Text;
+ }
+ else
+ {
+ // when changing locale:
+ // - delete decrypt key
+ // - clear/delete identity tokens file
+ config.LocaleCountryCode = newLocale;
+ config.DecryptKey = "";
+ File.Delete(AudibleApiStorage.IdentityTokensFile);
+ }
+
config.DownloadsInProgressEnum = downloadsInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";