Add "Locate Audiobooks" help text
This commit is contained in:
parent
e35f5209dc
commit
cecabc911e
@ -20,6 +20,7 @@ namespace LibationAvalonia.ViewModels
|
||||
private bool _removeButtonsVisible = Design.IsDesignMode;
|
||||
private int _numAccountsScanning = 2;
|
||||
private int _accountsCount = 0;
|
||||
public string LocateAudiobooksTip => Configuration.GetHelpText("LocateAudiobooks");
|
||||
|
||||
/// <summary> Auto scanning accounts is enables </summary>
|
||||
public bool AutoScanChecked { get => _autoScanChecked; set => Configuration.Instance.AutoScan = this.RaiseAndSetIfChanged(ref _autoScanChecked, value); }
|
||||
@ -172,10 +173,21 @@ namespace LibationAvalonia.ViewModels
|
||||
}
|
||||
|
||||
public async Task LocateAudiobooksAsync()
|
||||
{
|
||||
var result = await MessageBox.Show(
|
||||
MainWindow,
|
||||
Configuration.GetHelpText(nameof(LibationAvalonia.Dialogs.LocateAudiobooksDialog)),
|
||||
"Locate Previously-Liberated Audiobook Files",
|
||||
MessageBoxButtons.OKCancel,
|
||||
MessageBoxIcon.Information,
|
||||
MessageBoxDefaultButton.Button1);
|
||||
|
||||
if (result is DialogResult.OK)
|
||||
{
|
||||
var locateDialog = new LibationAvalonia.Dialogs.LocateAudiobooksDialog();
|
||||
await locateDialog.ShowDialog(MainWindow);
|
||||
}
|
||||
}
|
||||
|
||||
private void setyNumScanningAccounts(int numScanning)
|
||||
{
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
<MenuItem IsVisible="{CompiledBinding MultipleAccounts}" IsEnabled="{CompiledBinding RemoveMenuItemsEnabled}" Command="{CompiledBinding RemoveBooksSomeAsync}" Header="_Remove Books from Some Accounts" />
|
||||
|
||||
<Separator />
|
||||
<MenuItem Command="{CompiledBinding LocateAudiobooksAsync}" Header="L_ocate Audiobooks..." />
|
||||
<MenuItem Command="{CompiledBinding LocateAudiobooksAsync}" Header="L_ocate Audiobooks..." ToolTip.Tip="{CompiledBinding LocateAudiobooksTip}" />
|
||||
|
||||
</MenuItem>
|
||||
|
||||
|
||||
@ -107,8 +107,27 @@ namespace LibationFileManager
|
||||
don't have a spatial audio version will be download
|
||||
as usual based on your other file quality settings.
|
||||
""" },
|
||||
}
|
||||
.AsReadOnly();
|
||||
{"LocateAudiobooks","""
|
||||
Scan the contents a folder to find audio files that
|
||||
match books in Libation's database. This is useful
|
||||
if you moved your Books folder or re-installed
|
||||
Libation and want it to be able to find your
|
||||
already downloaded audiobooks.
|
||||
|
||||
Prerequisite: An audiobook must already exist in
|
||||
Libation's database (through an Audible account
|
||||
scan) for a matching audio file to be found.
|
||||
""" },
|
||||
{"LocateAudiobooksDialog","""
|
||||
Libation will search all .m4b and .mp3 files in a folder, looking for audio files belonging to library books in Libation's database.
|
||||
|
||||
If an audiobook file is found that matches one of Libation's library books, Libation will mark that book as "Liberated" (green stoplight).
|
||||
|
||||
For an audio file to be identified, Libation must have that library book in its database. If you're on a fresh installation of Libation, be sure to add and scan all of your Audible accounts before running this action.
|
||||
|
||||
This may take a while, depending on the number of audio files in the folder and the speed of your storage device.
|
||||
""" }
|
||||
}.AsReadOnly();
|
||||
|
||||
public static string GetHelpText(string? settingName)
|
||||
=> settingName != null && HelpText.TryGetValue(settingName, out var value) ? value : "";
|
||||
|
||||
@ -17,6 +17,7 @@ namespace LibationWinForms
|
||||
{
|
||||
this.Load += refreshImportMenu;
|
||||
AccountsSettingsPersister.Saved += (_, _) => Invoke(refreshImportMenu, null, null);
|
||||
locateAudiobooksToolStripMenuItem.ToolTipText = Configuration.GetHelpText("LocateAudiobooks");
|
||||
}
|
||||
|
||||
private void refreshImportMenu(object _, EventArgs __)
|
||||
@ -96,6 +97,15 @@ namespace LibationWinForms
|
||||
|
||||
private void locateAudiobooksToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var result = MessageBox.Show(
|
||||
this,
|
||||
Configuration.GetHelpText(nameof(LocateAudiobooksDialog)),
|
||||
"Locate Previously-Liberated Audiobook Files",
|
||||
MessageBoxButtons.OKCancel,
|
||||
MessageBoxIcon.Information,
|
||||
MessageBoxDefaultButton.Button1);
|
||||
|
||||
if (result is DialogResult.OK)
|
||||
new LocateAudiobooksDialog().ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user