60 lines
1.6 KiB
C#
60 lines
1.6 KiB
C#
using System.Xml.Serialization;
|
|
using MediaBrowser.Model.Plugins;
|
|
|
|
namespace Jellyfin.Plugin.Multilang.Configuration;
|
|
|
|
public sealed class PluginConfiguration : BasePluginConfiguration
|
|
{
|
|
public string TmdbApiKey { get; set; } = string.Empty;
|
|
|
|
public string FanartApiKey { get; set; } = string.Empty;
|
|
|
|
public string[] Languages { get; set; } = ["en-US", "fi-FI", "sv-SE"];
|
|
|
|
public ProviderState[] Providers { get; set; } =
|
|
[
|
|
new() { Id = "tmdb", MetadataOrder = 0, ArtworkOrder = 0 },
|
|
new() { Id = "fanart", MetadataOrder = -1, ArtworkOrder = 1 }
|
|
];
|
|
|
|
public int WaitDaysForMissingData { get; set; } = 7;
|
|
|
|
public int WaitDaysForExistingData { get; set; } = 60;
|
|
|
|
public int ItemsProxyCacheThresholdMs { get; set; } = 1000;
|
|
|
|
public int ItemsProxyCacheTtlMinutes { get; set; } = 120;
|
|
|
|
public int ItemsProxyCacheMaxMiB { get; set; } = 50;
|
|
|
|
public string AssetStorageMode { get; set; } = "url";
|
|
|
|
[XmlArray("SortArticles")]
|
|
[XmlArrayItem("SortArticleEntry")]
|
|
public SortArticleEntry[] ArticleEntries { get; set; } = [];
|
|
|
|
public bool EnableLogging { get; set; }
|
|
|
|
public bool VerboseLogging { get; set; }
|
|
|
|
public bool CleanupDataOnUninstall { get; set; }
|
|
}
|
|
|
|
public sealed class ProviderState
|
|
{
|
|
public string Id { get; set; } = string.Empty;
|
|
|
|
public int MetadataOrder { get; set; } = -1;
|
|
|
|
public int ArtworkOrder { get; set; } = -1;
|
|
}
|
|
|
|
public sealed class SortArticleEntry
|
|
{
|
|
public string Language { get; set; } = string.Empty;
|
|
|
|
public string Articles { get; set; } = string.Empty;
|
|
|
|
public bool? AlwaysApply { get; set; }
|
|
}
|