From 44a22803b33a17483c686c13bb67d9958fe9c514 Mon Sep 17 00:00:00 2001
From: DJDoubleD <34967020+DJDoubleD@users.noreply.github.com>
Date: Mon, 14 Aug 2023 15:51:49 +0200
Subject: [PATCH] Make application settings portable
- Implement PortableJsonSettingsProvider
- Set all settings to roaming=True
---
QobuzDownloaderX/App.config | 274 +++++++++---------
QobuzDownloaderX/Program.cs | 7 +-
.../Properties/Settings.Designer.cs | 44 +++
QobuzDownloaderX/Properties/Settings.settings | 88 +++---
QobuzDownloaderX/Shared/Tools/FileTools.cs | 8 +
QobuzDownloaderX/View/LoginForm.cs | 4 +
6 files changed, 243 insertions(+), 182 deletions(-)
diff --git a/QobuzDownloaderX/App.config b/QobuzDownloaderX/App.config
index 1cfb1e6..a5d45a0 100644
--- a/QobuzDownloaderX/App.config
+++ b/QobuzDownloaderX/App.config
@@ -1,149 +1,13 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- False
-
-
- True
-
-
- True
-
-
-
-
-
- False
-
-
- False
-
-
- False
-
-
- True
-
-
- 27
-
-
- .flac
-
-
-
-
-
-
-
-
- 0
-
-
- 2
-
-
- True
-
-
- 100
-
-
- 1
-
-
- -
-
-
- True
-
-
- True
-
-
- True
-
-
- ,
-
-
- &
-
-
- False
-
-
-
@@ -152,4 +16,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ False
+
+
+ True
+
+
+ True
+
+
+
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ True
+
+
+ 27
+
+
+ .flac
+
+
+
+
+
+
+
+
+ 0
+
+
+ 2
+
+
+ True
+
+
+ 100
+
+
+ 1
+
+
+ -
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ ,
+
+
+ &
+
+
+ False
+
+
+
\ No newline at end of file
diff --git a/QobuzDownloaderX/Program.cs b/QobuzDownloaderX/Program.cs
index 40cc0eb..49ffbea 100644
--- a/QobuzDownloaderX/Program.cs
+++ b/QobuzDownloaderX/Program.cs
@@ -1,4 +1,5 @@
-using QobuzDownloaderX.Shared;
+using Bluegrams.Application;
+using QobuzDownloaderX.Shared;
using System;
using System.Globalization;
using System.Windows.Forms;
@@ -13,6 +14,10 @@ internal static class Program
[STAThread]
private static void Main()
{
+ // Make the default settings class portable
+ PortableJsonSettingsProvider.SettingsDirectory = FileTools.GetInitializedSettingsDir();
+ PortableJsonSettingsProvider.ApplyProvider(Properties.Settings.Default);
+
// Use en-US formatting everywhere for consistency
var culture = CultureInfo.GetCultureInfo("en-US");
diff --git a/QobuzDownloaderX/Properties/Settings.Designer.cs b/QobuzDownloaderX/Properties/Settings.Designer.cs
index 8bbfead..dca9d46 100644
--- a/QobuzDownloaderX/Properties/Settings.Designer.cs
+++ b/QobuzDownloaderX/Properties/Settings.Designer.cs
@@ -26,6 +26,7 @@ public static Settings Default {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string savedFolder {
get {
return ((string)(this["savedFolder"]));
@@ -38,6 +39,7 @@ public string savedFolder {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string savedAppID {
get {
return ((string)(this["savedAppID"]));
@@ -50,6 +52,7 @@ public string savedAppID {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string savedEmail {
get {
return ((string)(this["savedEmail"]));
@@ -62,6 +65,7 @@ public string savedEmail {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string savedPassword {
get {
return ((string)(this["savedPassword"]));
@@ -74,6 +78,7 @@ public string savedPassword {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string savedFormatID {
get {
return ((string)(this["savedFormatID"]));
@@ -86,6 +91,7 @@ public string savedFormatID {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool UpgradeRequired {
get {
return ((bool)(this["UpgradeRequired"]));
@@ -98,6 +104,7 @@ public bool UpgradeRequired {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool albumTag {
get {
return ((bool)(this["albumTag"]));
@@ -110,6 +117,7 @@ public bool albumTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool artistTag {
get {
return ((bool)(this["artistTag"]));
@@ -122,6 +130,7 @@ public bool artistTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool albumArtistTag {
get {
return ((bool)(this["albumArtistTag"]));
@@ -134,6 +143,7 @@ public bool albumArtistTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool trackTag {
get {
return ((bool)(this["trackTag"]));
@@ -146,6 +156,7 @@ public bool trackTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool totalTracksTag {
get {
return ((bool)(this["totalTracksTag"]));
@@ -158,6 +169,7 @@ public bool totalTracksTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool discTag {
get {
return ((bool)(this["discTag"]));
@@ -170,6 +182,7 @@ public bool discTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool totalDiscsTag {
get {
return ((bool)(this["totalDiscsTag"]));
@@ -182,6 +195,7 @@ public bool totalDiscsTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool genreTag {
get {
return ((bool)(this["genreTag"]));
@@ -194,6 +208,7 @@ public bool genreTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool isrcTag {
get {
return ((bool)(this["isrcTag"]));
@@ -206,6 +221,7 @@ public bool isrcTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool upcTag {
get {
return ((bool)(this["upcTag"]));
@@ -218,6 +234,7 @@ public bool upcTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool copyrightTag {
get {
return ((bool)(this["copyrightTag"]));
@@ -230,6 +247,7 @@ public bool copyrightTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool yearTag {
get {
return ((bool)(this["yearTag"]));
@@ -242,6 +260,7 @@ public bool yearTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool explicitTag {
get {
return ((bool)(this["explicitTag"]));
@@ -254,6 +273,7 @@ public bool explicitTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool imageTag {
get {
return ((bool)(this["imageTag"]));
@@ -266,6 +286,7 @@ public bool imageTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool commentTag {
get {
return ((bool)(this["commentTag"]));
@@ -278,6 +299,7 @@ public bool commentTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool composerTag {
get {
return ((bool)(this["composerTag"]));
@@ -290,6 +312,7 @@ public bool composerTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool trackTitleTag {
get {
return ((bool)(this["trackTitleTag"]));
@@ -302,6 +325,7 @@ public bool trackTitleTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string commentText {
get {
return ((string)(this["commentText"]));
@@ -314,6 +338,7 @@ public string commentText {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool quality1 {
get {
return ((bool)(this["quality1"]));
@@ -326,6 +351,7 @@ public bool quality1 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool quality2 {
get {
return ((bool)(this["quality2"]));
@@ -338,6 +364,7 @@ public bool quality2 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool quality3 {
get {
return ((bool)(this["quality3"]));
@@ -350,6 +377,7 @@ public bool quality3 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool quality4 {
get {
return ((bool)(this["quality4"]));
@@ -362,6 +390,7 @@ public bool quality4 {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("27")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string qualityFormat {
get {
return ((string)(this["qualityFormat"]));
@@ -374,6 +403,7 @@ public string qualityFormat {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(".flac")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string audioType {
get {
return ((string)(this["audioType"]));
@@ -386,6 +416,7 @@ public string audioType {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string savedUserID {
get {
return ((string)(this["savedUserID"]));
@@ -398,6 +429,7 @@ public string savedUserID {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string savedUserAuthToken {
get {
return ((string)(this["savedUserAuthToken"]));
@@ -410,6 +442,7 @@ public string savedUserAuthToken {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string savedAltLoginValue {
get {
return ((string)(this["savedAltLoginValue"]));
@@ -422,6 +455,7 @@ public string savedAltLoginValue {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("2")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public int savedArtSize {
get {
return ((int)(this["savedArtSize"]));
@@ -434,6 +468,7 @@ public int savedArtSize {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool typeTag {
get {
return ((bool)(this["typeTag"]));
@@ -446,6 +481,7 @@ public bool typeTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("100")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public int savedMaxLength {
get {
return ((int)(this["savedMaxLength"]));
@@ -458,6 +494,7 @@ public int savedMaxLength {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public int savedFilenameTemplate {
get {
return ((int)(this["savedFilenameTemplate"]));
@@ -470,6 +507,7 @@ public int savedFilenameTemplate {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(" - ")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string savedFilenameTemplateString {
get {
return ((string)(this["savedFilenameTemplateString"]));
@@ -482,6 +520,7 @@ public string savedFilenameTemplateString {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool producerTag {
get {
return ((bool)(this["producerTag"]));
@@ -494,6 +533,7 @@ public bool producerTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool labelTag {
get {
return ((bool)(this["labelTag"]));
@@ -506,6 +546,7 @@ public bool labelTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool involvedPeopleTag {
get {
return ((bool)(this["involvedPeopleTag"]));
@@ -518,6 +559,7 @@ public bool involvedPeopleTag {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(", ")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string initialListSeparator {
get {
return ((string)(this["initialListSeparator"]));
@@ -530,6 +572,7 @@ public string initialListSeparator {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(" & ")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public string listEndSeparator {
get {
return ((string)(this["listEndSeparator"]));
@@ -542,6 +585,7 @@ public string listEndSeparator {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
+ [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool mergePerformers {
get {
return ((bool)(this["mergePerformers"]));
diff --git a/QobuzDownloaderX/Properties/Settings.settings b/QobuzDownloaderX/Properties/Settings.settings
index 4990cb8..bb0de4f 100644
--- a/QobuzDownloaderX/Properties/Settings.settings
+++ b/QobuzDownloaderX/Properties/Settings.settings
@@ -2,136 +2,136 @@
-
+
-
+
-
+
-
+
-
+
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
True
-
+
False
-
+
True
-
+
True
-
+
-
+
False
-
+
False
-
+
False
-
+
True
-
+
27
-
+
.flac
-
+
-
+
-
+
0
-
+
2
-
+
True
-
+
100
-
+
1
-
+
-
-
+
True
-
+
True
-
+
True
-
+
,
-
+
&
-
+
False
diff --git a/QobuzDownloaderX/Shared/Tools/FileTools.cs b/QobuzDownloaderX/Shared/Tools/FileTools.cs
index 3a8a208..8ee7b0d 100644
--- a/QobuzDownloaderX/Shared/Tools/FileTools.cs
+++ b/QobuzDownloaderX/Shared/Tools/FileTools.cs
@@ -31,5 +31,13 @@ public static string GetInitializedLogDir()
return logDirPath;
}
+
+ public static string GetInitializedSettingsDir()
+ {
+ string settingsDirPath = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "settings");
+ if (!System.IO.Directory.Exists(settingsDirPath)) System.IO.Directory.CreateDirectory(settingsDirPath);
+
+ return settingsDirPath;
+ }
}
}
\ No newline at end of file
diff --git a/QobuzDownloaderX/View/LoginForm.cs b/QobuzDownloaderX/View/LoginForm.cs
index 0d59bad..067f1c1 100644
--- a/QobuzDownloaderX/View/LoginForm.cs
+++ b/QobuzDownloaderX/View/LoginForm.cs
@@ -57,12 +57,16 @@ private async void LoginFrm_Load(object sender, EventArgs e)
// Bring to center of screen.
CenterToScreen();
+ /*
+ * Only needed when using the default .NET SettingsProvider, not applicable when using PortableJsonSettingsProvider
+ // Initialise new settings with values from previous version when assembly version changes.
if (Properties.Settings.Default.UpgradeRequired)
{
Properties.Settings.Default.Upgrade();
Properties.Settings.Default.UpgradeRequired = false;
Properties.Settings.Default.Save();
}
+ */
// Set saved settings to correct places.
emailTextbox.Text = Settings.Default.savedEmail;