Fichiers
jellyfin-plugin-sharelinks/Jellyfin.Plugin.ShareLinks/Configuration/PluginConfiguration.cs
T
Franciskid 06a49d0bfe show a friendly page for dead share links, drop plugin-specific selector defaults
Opening an expired or invalid link used to dump raw problem-details
JSON at the guest. Now they get a small page matching the sign-in
look, with the same neutral wording whether the link expired or never
existed (so tokens cannot be probed by outsiders), and an automatic
redirect to the Jellyfin home page. Fixes #1.

GuestHiddenSelectors now defaults to empty instead of shipping CSS
selectors for a plugin nobody else runs. Existing installs keep their
saved value. Fixes #3.
2026-07-08 01:39:28 +02:00

52 lignes
2.1 KiB
C#

using MediaBrowser.Model.Plugins;
namespace Jellyfin.Plugin.ShareLinks.Configuration;
/// <summary>
/// Plugin configuration persisted by Jellyfin.
/// </summary>
public class PluginConfiguration : BasePluginConfiguration
{
/// <summary>Gets or sets a value indicating whether the plugin is enabled.</summary>
public bool Enabled { get; set; } = true;
/// <summary>Gets or sets the default share expiry in hours.</summary>
public int DefaultExpiryHours { get; set; } = 24;
/// <summary>Gets or sets the maximum allowed share expiry in hours.</summary>
public int MaxExpiryHours { get; set; } = 720;
/// <summary>
/// Gets or sets an override for the public base URL used when building
/// absolute share links. Empty means "derive from the incoming request".
/// </summary>
public string PublicBaseUrlOverride { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the prefix used when creating guest user names.
/// </summary>
public string GuestUsernamePrefix { get; set; } = "share-";
/// <summary>Gets or sets a value indicating whether shares may transcode.</summary>
public bool AllowTranscoding { get; set; } = true;
/// <summary>Gets or sets a value indicating whether shares may remux.</summary>
public bool AllowRemuxing { get; set; } = true;
/// <summary>Gets or sets the cleanup interval, in minutes.</summary>
public int CleanupIntervalMinutes { get; set; } = 60;
/// <summary>Gets or sets a value indicating whether links default to one use.</summary>
public bool OneUseDefault { get; set; } = true;
/// <summary>Gets or sets a value indicating whether guest-mode lockdown is enabled.</summary>
public bool GuestModeLockdownEnabled { get; set; } = true;
/// <summary>
/// Gets or sets a comma-separated list of CSS selectors that are hidden from guest
/// sessions in the web client. Used to suppress other plugins' injected UI (search
/// bars, floating buttons) so a guest only sees the shared title. Empty by default.
/// </summary>
public string GuestHiddenSelectors { get; set; } = string.Empty;
}