Changed DownloadChapters setting to AllowLibationFixup.

This commit is contained in:
Michael Bucari-Tovo 2021-06-30 17:38:24 -06:00
parent 3af84af2e2
commit 6696317ae6
6 changed files with 21 additions and 42 deletions

View File

@ -73,7 +73,7 @@ namespace FileLiberator
var aaxcDecryptDlLic = new DownloadLicense(dlLic.DownloadUrl, dlLic.AudibleKey, dlLic.AudibleIV, Resources.UserAgent);
if (Configuration.Instance.DownloadChapters)
if (Configuration.Instance.AllowLibationFixup)
{
var contentMetadata = await api.GetLibraryBookMetadataAsync(libraryBook.Book.AudibleProductId);
var aaxcDecryptChapters = new ChapterInfo();
@ -115,7 +115,7 @@ namespace FileLiberator
private void AaxcDownloader_RetrievedCoverArt(object sender, byte[] e)
{
if (e is null && Configuration.Instance.DownloadChapters)
if (e is null && Configuration.Instance.AllowLibationFixup)
{
RequestCoverArt?.Invoke(this, aaxcDownloader.SetCoverArt);
}

View File

@ -83,11 +83,11 @@ namespace FileManager
set => persistentDictionary.Set(nameof(DecryptInProgressEnum), value);
}
[Description("Download chapter titles from Audible?")]
public bool DownloadChapters
[Description("Allow Libation for fix up audiobook metadata?")]
public bool AllowLibationFixup
{
get => persistentDictionary.Get<bool>(nameof(DownloadChapters));
set => persistentDictionary.Set(nameof(DownloadChapters), value);
get => persistentDictionary.Get<bool>(nameof(AllowLibationFixup));
set => persistentDictionary.Set(nameof(AllowLibationFixup), value);
}
// note: any potential file manager static ctors can't compensate if storage dir is changed at run time via settings. this is partly bad architecture. but the side effect is desirable. if changing LibationFiles location: restart app

View File

@ -60,7 +60,7 @@ namespace LibationLauncher
config.DownloadsInProgressEnum ??= "WinTemp";
config.DecryptInProgressEnum ??= "WinTemp";
config.Books ??= Configuration.AppDir;
config.DownloadChapters = true;
config.AllowLibationFixup = true;
};
// setupDialog.BasicBtn_Click += (_, __) => // no action needed
setupDialog.AdvancedBtn_Click += (_, __) => isAdvanced = true;
@ -235,9 +235,9 @@ namespace LibationLauncher
{
var persistentDictionary = new PersistentDictionary(Configuration.Instance.SettingsFilePath);
if (persistentDictionary.GetString("DownloadChapters") is null)
if (persistentDictionary.GetString("AllowLibationFixup") is null)
{
persistentDictionary.Set("DownloadChapters", true);
persistentDictionary.Set("AllowLibationFixup", true);
}
if (!File.Exists(AudibleApiStorage.AccountsSettingsFile))

View File

@ -43,7 +43,7 @@
this.saveBtn = new System.Windows.Forms.Button();
this.cancelBtn = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.downloadChaptersCbox = new System.Windows.Forms.CheckBox();
this.allowLibationFixupCbox = new System.Windows.Forms.CheckBox();
this.downloadsInProgressGb.SuspendLayout();
this.decryptInProgressGb.SuspendLayout();
this.groupBox1.SuspendLayout();
@ -215,7 +215,7 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.downloadChaptersCbox);
this.groupBox1.Controls.Add(this.allowLibationFixupCbox);
this.groupBox1.Controls.Add(this.downloadsInProgressGb);
this.groupBox1.Controls.Add(this.decryptInProgressGb);
this.groupBox1.Location = new System.Drawing.Point(18, 61);
@ -229,13 +229,13 @@
//
// downloadChaptersCbox
//
this.downloadChaptersCbox.AutoSize = true;
this.downloadChaptersCbox.Location = new System.Drawing.Point(10, 24);
this.downloadChaptersCbox.Name = "downloadChaptersCbox";
this.downloadChaptersCbox.Size = new System.Drawing.Size(224, 19);
this.downloadChaptersCbox.TabIndex = 6;
this.downloadChaptersCbox.Text = "Download chapter titles from Audible";
this.downloadChaptersCbox.UseVisualStyleBackColor = true;
this.allowLibationFixupCbox.AutoSize = true;
this.allowLibationFixupCbox.Location = new System.Drawing.Point(10, 24);
this.allowLibationFixupCbox.Name = "downloadChaptersCbox";
this.allowLibationFixupCbox.Size = new System.Drawing.Size(262, 19);
this.allowLibationFixupCbox.TabIndex = 6;
this.allowLibationFixupCbox.Text = "Allow Libation to fix up audiobook metadata";
this.allowLibationFixupCbox.UseVisualStyleBackColor = true;
//
// SettingsDialog
//
@ -284,6 +284,6 @@
private System.Windows.Forms.Button saveBtn;
private System.Windows.Forms.Button cancelBtn;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox downloadChaptersCbox;
private System.Windows.Forms.CheckBox allowLibationFixupCbox;
}
}

View File

@ -36,7 +36,7 @@ namespace LibationWinForms.Dialogs
? config.Books
: Path.GetDirectoryName(Exe.FileLocationOnDisk);
downloadChaptersCbox.Checked = config.DownloadChapters;
allowLibationFixupCbox.Checked = config.AllowLibationFixup;
switch (config.DownloadsInProgressEnum)
{
@ -73,7 +73,7 @@ namespace LibationWinForms.Dialogs
private void saveBtn_Click(object sender, EventArgs e)
{
config.DownloadChapters = downloadChaptersCbox.Checked;
config.AllowLibationFixup = allowLibationFixupCbox.Checked;
config.DownloadsInProgressEnum = downloadsInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";

View File

@ -81,15 +81,6 @@
<metadata name="downloadsInProgressDescLbl.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="downloadsInProgressLibationFilesRb.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="downloadsInProgressWinTempRb.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="downloadsInProgressDescLbl.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="decryptInProgressGb.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -102,15 +93,6 @@
<metadata name="decryptInProgressDescLbl.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="decryptInProgressLibationFilesRb.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="decryptInProgressWinTempRb.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="decryptInProgressDescLbl.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="saveBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -123,9 +105,6 @@
<metadata name="downloadChaptersCbox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="downloadChaptersCbox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>