mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-09-13 06:07:30 -04:00
Libation asked GitHub for a newer release every time it started, with no way to stop it. That is noise for anyone whose install is updated by something else - a package manager, or an AppImage updater - because the prompt it raises is one they can do nothing useful with. Add CheckForUpgradesAtStartup, on by default so nothing changes for people who rely on the prompt. Only the automatic check is optional: the About window's "Check for Upgrade" button and the CLI's `version --check` ask for a check outright, so they run either way. That is why the setting is read in a new CheckForUpgradeAtStartupAsync rather than inside CheckForUpgradeAsync, which the startup path and the About button share. The new setting takes the slot of BetaOptIn, which is deleted here. It was declared, described and logged, but no axaml or designer ever bound it and nothing read the value: GetLatestRelease only ever asks for the stable release, so there was no beta channel for it to select. A stale BetaOptIn key in an existing Settings.json needs no migration, since PersistentDictionary ignores keys with no matching property. Closes #1999 Co-authored-by: rmcrackan <rmcrackan@gmail.com>
191 lines
8.0 KiB
C#
191 lines
8.0 KiB
C#
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
|
|
namespace LibationFileManager;
|
|
|
|
public partial class Configuration
|
|
{
|
|
private static ReadOnlyDictionary<string, string> HelpText { get; } = new Dictionary<string, string>
|
|
{
|
|
{nameof(CombineNestedChapterTitles),"""
|
|
If the book has nested chapters, e.g. a chapter named
|
|
"Part 1" that contains chapters "Chapter 1" and
|
|
"Chapter 2", then combine the chapter titles like the
|
|
following example:
|
|
|
|
Part 1: Chapter 1
|
|
Part 1: Chapter 2
|
|
"""},
|
|
{nameof(AllowLibationFixup), """
|
|
In addition to the options that are enabled if you allow
|
|
"fixing up" the audiobook, it does the following:
|
|
|
|
* Sets the ©gen metadata tag for the genres.
|
|
* Adds the TCOM (@wrt in M4B files) metadata tag for the narrators.
|
|
* Unescapes the copyright symbol (replace © with ©)
|
|
* Replaces the recording copyright (P) string with ℗
|
|
* Adds various other metadata tags recognized by AudiobookShelf
|
|
* Sets the embedded cover art image with cover art retrieved from Audible
|
|
""" },
|
|
{nameof(MoveMoovToBeginning), """
|
|
Moves the mpeg 'moov' box to the beginning of the file.
|
|
Using this option will generally make the audiobook load
|
|
faster, and will make streaming the file over the internet
|
|
faster.
|
|
|
|
This is an extra operation performed after the m4b file
|
|
has been created, and the speed of it can vary greatly
|
|
depending on how fast Libation can read and write from the
|
|
book storage location.
|
|
""" },
|
|
{nameof(LameDownsampleMono), """
|
|
Most "stereo" audiobooks just duplicate the same audio
|
|
for both channels, so you can save on storage size and
|
|
decrease encoding time by only using one audio channel.
|
|
""" },
|
|
{nameof(DecryptToLossy), """
|
|
Audible delivers its audiobooks in the mpeg-4 audio
|
|
file format (aka M4B). If you choose the "Lossless"
|
|
option, Libation will leave the original Audible audio
|
|
untouched. If you choose "MP3", Libation will re-
|
|
encode the audio as an MP3 using the settings below.
|
|
|
|
Note that podcasts are usually delivered as MP3s.
|
|
""" },
|
|
{nameof(MergeOpeningAndEndCredits), """
|
|
This setting only affects the chapter metadata.
|
|
In most audiobooks, the first chapter is "Opening
|
|
Credits" and the last chapter is "End Credits".
|
|
Enabling this option will remove the credits chapter
|
|
markers and shift the adjacent chapter markers to
|
|
fill the space.
|
|
""" },
|
|
{nameof(RetainAaxFile), """
|
|
Libation will keep the Audible source aax file
|
|
and move it to the book's destination directory.
|
|
Libation will also create a .key file containing
|
|
the decryption key and IV.
|
|
""" },
|
|
{nameof(StripUnabridged), """
|
|
Many audiobooks contain "(Unabridged)" in the title.
|
|
Enabling this option will remove that text from the
|
|
Title and Album metadata tags.
|
|
""" },
|
|
{nameof(StripAudibleBrandAudio), """
|
|
All audiobooks begin and end with a few seconds of
|
|
Audible branding audio. In English it's "This is
|
|
Audible" and "Audible hopes you have enjoyed this
|
|
program".
|
|
|
|
Enabling this option will remove that branded audio
|
|
from the decrypted audiobook. This does not require
|
|
re-encoding.
|
|
""" },
|
|
{nameof(MinimumFileDuration), """
|
|
The minimum duration (in minutes) for an chapter to
|
|
be split into its own file. Chapters shorter than
|
|
this duration will be merged with the following
|
|
chapter. Merged chapter titles will be joined with
|
|
a space between them.
|
|
""" },
|
|
{nameof(SpatialAudioCodec), """
|
|
The Dolby Digital Plus (E-AC-3) codec is more widely
|
|
supported than the AC-4 codec, but E-AC-3 files are
|
|
much larger than AC-4 files.
|
|
""" },
|
|
{nameof(UseWidevine), """
|
|
Some audiobooks are only delivered in the highest
|
|
available quality with special, third-party content
|
|
protection. Enabling this option will allows you to
|
|
request audiobooks in the xHE-AAC codec, which is
|
|
often higher quality than the standard AAC-LC codec.
|
|
""" },
|
|
{nameof(Request_xHE_AAC), """
|
|
If selected, Libation will request audiobooks in the
|
|
xHE-AAC codec. This codec is generally better quality
|
|
than AAC-LC codec (which is what you'll get if this
|
|
option isn't enabled), but it isn't as commonly
|
|
supported by media players, so you may have some
|
|
difficulty playing these audiobooks.
|
|
""" },
|
|
{nameof(RequestSpatial), """
|
|
If selected, Libation will request audiobooks in the
|
|
Dolby Atmos 'Spatial Audio' format. Audiobooks which
|
|
don't have a spatial audio version will be download
|
|
as usual based on your other audio format settings.
|
|
""" },
|
|
{"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.
|
|
""" },
|
|
{"FindBetterQualityBooks","""
|
|
For all liberated audiobooks in your library, scan
|
|
Audible's servers to see if a higher-quality audio
|
|
format exists. If a better quality format is found,
|
|
you can choose to mark those books for re
|
|
-download.
|
|
""" },
|
|
{"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.
|
|
""" },
|
|
{nameof(DailyDownloadLimit), """
|
|
Stop downloading once you have downloaded this much
|
|
within the last 24 hours. This is a rolling window,
|
|
not a calendar day: capacity frees up 24 hours after
|
|
each download, not at midnight.
|
|
|
|
Only downloads that Libation completed successfully
|
|
are counted. Books you download from the Audible app
|
|
or website are not counted, because Libation cannot
|
|
see them.
|
|
|
|
"Plus titles only" limits just the Audible Plus
|
|
catalog titles (the ones with the orange plus badge),
|
|
which is where Audible is known to throttle heavy
|
|
use. Titles you own keep downloading.
|
|
""" },
|
|
{nameof(DailyDownloadLimitUnit), """
|
|
MB and GB are approximate. Libation does not know
|
|
precisely how large an audiobook is before it has
|
|
been downloaded, so it assumes about 400 MB per book
|
|
when deciding whether another download would exceed
|
|
your limit.
|
|
""" },
|
|
{nameof(ImportPlusTitles), """
|
|
When enabled, books from the Audible Plus catalog (titles you stream or borrow under your membership, not purchased) are imported into Libation.
|
|
|
|
Downloading or liberating many Plus titles in a short time can cause Audible to temporarily deny content licenses ("license denied") for a day or two. That limit is enforced by Audible, not Libation — waiting and retrying usually fixes it. If problems persist after several days, report on Libation's GitHub with logs.
|
|
""" },
|
|
{nameof(CheckForUpgradesAtStartup), """
|
|
When enabled, Libation asks GitHub whether a newer
|
|
release exists each time it starts, and offers it to
|
|
you if there is one.
|
|
|
|
Turn this off if something else keeps Libation up to
|
|
date, such as a package manager or an AppImage
|
|
updater. You can still check whenever you like:
|
|
Help > About has a "Check for Upgrade" button that
|
|
works either way.
|
|
""" }
|
|
}.AsReadOnly();
|
|
|
|
/// <summary>Tooltip for the Import Audible Plus books checkbox. Use from WinForms and Avalonia import settings so both stay aligned.</summary>
|
|
public static string ImportPlusTitlesToolTip => GetHelpText(nameof(ImportPlusTitles));
|
|
|
|
public static string GetHelpText(string? settingName)
|
|
=> settingName != null && HelpText.TryGetValue(settingName, out var value) ? value : "";
|
|
}
|