using MediaBrowser.Model.Plugins;
namespace Jellyfin.Plugin.Floatplane.Configuration;
///
/// Plugin settings. Serialised to XML by Jellyfin
/// (plugins/configurations/Floatplane.xml), so keep properties simple and public.
///
public class PluginConfiguration : BasePluginConfiguration
{
///
/// Value of the sails.sid cookie copied from a logged-in browser session.
/// Floatplane's password login needs a Cloudflare Turnstile token, which a server
/// cannot obtain, so the session is pasted in. Needed for playback; browsing is public.
///
public string SessionCookie { get; set; } = string.Empty;
///
/// Username reported by Floatplane the last time the cookie was validated (display only).
///
public string SessionUsername { get; set; } = string.Empty;
///
/// Comma-separated creator url-names (e.g. linustechtips) to show in addition to
/// (or, when not logged in, instead of) the account's subscriptions.
///
public string ExtraCreators { get; set; } = string.Empty;
/// Preferred quality level name: 360, 480, 720, 1080 or 2160.
public string PreferredQuality { get; set; } = "1080";
/// Highest level offered as a version at all (keeps 4K out of the list by default).
public int MaxHeight { get; set; } = 1080;
/// How many posts (newest first) are listed per Floatplane channel.
public int MaxPostsPerChannel { get; set; } = 100;
/// Show posts the account cannot access (higher tier) as locked items.
public bool ShowLockedPosts { get; set; }
///
/// Also offer a progressive MP4 version (Floatplane "download" delivery). Experimental:
/// the download URLs have not been verified to play with the signed token alone.
///
public bool EnableMp4Sources { get; set; }
///
/// Base URL the server's own ffmpeg uses to reach the plugin's stream proxy, e.g.
/// http://127.0.0.1:8096. Empty = Jellyfin's local API url.
///
public string ProxyBaseUrl { get; set; } = string.Empty;
/// Budget for /api/v3/delivery/info calls (Floatplane rate-limits ≈2/min).
public int DeliveryCallsPerMinute { get; set; } = 2;
/// How long listings are cached inside the plugin before Floatplane is asked again.
public int CatalogCacheMinutes { get; set; } = 30;
/// Hours between automatic catalogue refreshes (scheduled task).
public int SyncIntervalHours { get; set; } = 6;
/// Report watch progress back to Floatplane (not implemented yet).
public bool SyncProgressToFloatplane { get; set; }
}