using System.Diagnostics.CodeAnalysis; using MediaBrowser.Model.Plugins; namespace Jellyfin.Plugin.Lyrics.Configuration; /// /// Configuration for lyrics plugin. /// public class PluginConfiguration : BasePluginConfiguration { /// /// Gets or sets a value indicating whether to use strict search. /// public bool UseStrictSearch { get; set; } /// /// Gets or sets a value indicating whether to exclude artist name. /// public bool ExcludeArtistName { get; set; } = false; /// /// Gets or sets a value indicating whether to exclude album name. /// public bool ExcludeAlbumName { get; set; } = true; /// /// Gets or sets a value indicating whether to enable adaptive retry backoff. /// public bool EnableAdaptiveRetryBackoff { get; set; } = true; /// /// Gets or sets a value indicating whether to enforce a per-run processing cap. /// public bool EnableRunCap { get; set; } = true; /// /// Gets or sets the maximum number of tracks to process per run. /// public int MaxTracksPerRun { get; set; } = 2000; /// /// Gets or sets the state entry retention in days. /// public int FailureStateTtlDays { get; set; } = 90; /// /// Gets or sets the adaptive backoff schedule in days. /// [SuppressMessage("Performance", "CA1819:Properties should not return arrays", Justification = "Plugin configuration is persisted and exchanged via simple array values.")] public int[] BackoffScheduleDays { get; set; } = [1, 3, 7, 30]; /// /// Gets or sets a value indicating whether to filter LRCLIB matches by track duration. /// public bool EnableDurationFilter { get; set; } = true; /// /// Gets or sets the duration tolerance in seconds for accepting an LRCLIB match. /// Results whose duration differs from the local track by more than this value are rejected. /// Ignored when is false. /// public int DurationToleranceSeconds { get; set; } = 15; /// /// Gets or sets the base URL for the LRCLIB API. /// Defaults to the public instance. Set to an absolute http(s) URL to use a self-hosted instance. /// A trailing path is preserved (e.g. https://example.com/lrclib), so reverse-proxy subpaths work. /// Empty, whitespace, or non-http(s) values are ignored and the default is used. /// public string LrclibBaseUrl { get; set; } = "https://lrclib.net"; /// /// Gets or sets the legacy state cursor value. /// public int StateCursor { get; set; } }