Files
claude bf476134c2
Some checks failed
release / build-release (push) Has been cancelled
v0.2: All videos folder, shared watched state, release-order sorting, official icon, OAuth plumbing, docs
- per-creator "All videos" folder (release order across sub-channels); sub-channel copies use
  cpost: ids and UserDataMirror keeps played/resume state in sync
- SortNameUpdater forces release-order sort names so every client lists newest first by default
- official Floatplane icon as channel image (Primary only — a channel Thumb hid video thumbnails
  in Continue Watching) and as 16:9 plugin thumbnail; one-time image replacement on upgrade
- OAuth device-flow login (FloatplaneAuthService + settings UI); needs a Floatplane client id;
  Turnstile verified domain-bound so password login inside Jellyfin is impossible
- generic install.sh (linuxserver / official image / native), thumb.png in package + manifest
- README rewritten for a general audience, doc/usage.md with screenshots, 60 tests

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 16:36:32 +01:00

86 lines
3.8 KiB
C#

using MediaBrowser.Model.Plugins;
namespace Jellyfin.Plugin.Floatplane.Configuration;
/// <summary>
/// Plugin settings. Serialised to XML by Jellyfin
/// (<c>plugins/configurations/Floatplane.xml</c>), so keep properties simple and public.
/// </summary>
public class PluginConfiguration : BasePluginConfiguration
{
/// <summary>
/// Value of the <c>sails.sid</c> 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.
/// </summary>
public string SessionCookie { get; set; } = string.Empty;
/// <summary>
/// Username reported by Floatplane the last time the cookie was validated (display only).
/// </summary>
public string SessionUsername { get; set; } = string.Empty;
/// <summary>
/// Comma-separated creator url-names (e.g. <c>linustechtips</c>) to show in addition to
/// (or, when not logged in, instead of) the account's subscriptions.
/// </summary>
public string ExtraCreators { get; set; } = string.Empty;
/// <summary>Preferred quality level name: 360, 480, 720, 1080 or 2160.</summary>
public string PreferredQuality { get; set; } = "1080";
/// <summary>Highest level offered as a version at all (keeps 4K out of the list by default).</summary>
public int MaxHeight { get; set; } = 1080;
/// <summary>How many posts (newest first) are listed per Floatplane sub-channel.</summary>
public int MaxPostsPerChannel { get; set; } = 100;
/// <summary>How many posts (newest first) the per-creator "All videos" folder lists.</summary>
public int MaxPostsAllVideos { get; set; } = 200;
/// <summary>
/// OAuth client id registered with Floatplane for this plugin. Empty = OAuth login
/// unavailable (use the cookie). See the README for how to obtain one.
/// </summary>
public string OAuthClientId { get; set; } = string.Empty;
/// <summary>OAuth access token (short-lived, refreshed automatically).</summary>
public string OAuthAccessToken { get; set; } = string.Empty;
/// <summary>OAuth refresh token (≈90 days, rotated on refresh). Presence = logged in via OAuth.</summary>
public string OAuthRefreshToken { get; set; } = string.Empty;
/// <summary>Unix time (seconds) when the access token expires.</summary>
public long OAuthAccessTokenExpiry { get; set; }
/// <summary>Show posts the account cannot access (higher tier) as locked items.</summary>
public bool ShowLockedPosts { get; set; }
/// <summary>
/// Also offer a progressive MP4 version (Floatplane "download" delivery). Experimental:
/// the download URLs have not been verified to play with the signed token alone.
/// </summary>
public bool EnableMp4Sources { get; set; }
/// <summary>
/// Base URL the server's own ffmpeg uses to reach the plugin's stream proxy, e.g.
/// <c>http://127.0.0.1:8096</c>. Empty = Jellyfin's local API url.
/// </summary>
public string ProxyBaseUrl { get; set; } = string.Empty;
/// <summary>Budget for <c>/api/v3/delivery/info</c> calls (Floatplane rate-limits ≈2/min).</summary>
public int DeliveryCallsPerMinute { get; set; } = 2;
/// <summary>How long listings are cached inside the plugin before Floatplane is asked again.</summary>
public int CatalogCacheMinutes { get; set; } = 30;
/// <summary>Hours between automatic catalogue refreshes (scheduled task).</summary>
public int SyncIntervalHours { get; set; } = 6;
/// <summary>Version of the channel logo Jellyfin last stored (internal; drives a one-time image refresh).</summary>
public int ChannelImageVersion { get; set; }
/// <summary>Report watch progress back to Floatplane (not implemented yet).</summary>
public bool SyncProgressToFloatplane { get; set; }
}