diff --git a/contracts/settings/v1/conformance.json b/contracts/settings/v1/conformance.json index e279d86985..2186cb3145 100644 --- a/contracts/settings/v1/conformance.json +++ b/contracts/settings/v1/conformance.json @@ -1,6 +1,6 @@ { "fixture_version": 1, - "manifest_revision": 29, + "manifest_revision": 30, "description": "Cross-platform conformance cases for settings resolution. Every case runs against the shipped manifest in this directory: definitions are referenced by key, never restated, so an expectation can only be satisfied by resolving the real contract. Each platform's resolver (Go in internal/settingsresolve, TypeScript in web/src/lib/settingsResolve.ts, Kotlin and Swift in the client repos) runs every case through a hand-written runner; a runner must fail on any fixture field it does not know, because schema drift in the fixture itself is drift. A case's constraint_bindings attach a constraint to a copy of a real definition so constraint semantics stay testable even while no shipped definition carries that constraint kind. In expected entries, constrained:true requires stored_value and constraint_kind to be present, and stored_value may be null to mean the authored value was JSON null.", "cases": [ { @@ -383,6 +383,7 @@ "playback.subtitle_mode", "playback.show_forced_subtitles", "playback.next_up_prompt_seconds", + "playback.next_up_enabled", "playback.audio_language", "ui.app_language" ], @@ -391,6 +392,7 @@ { "key": "playback.subtitle_mode", "value": "auto", "source": "default" }, { "key": "playback.show_forced_subtitles", "value": true, "source": "default" }, { "key": "playback.next_up_prompt_seconds", "value": 30, "source": "default" }, + { "key": "playback.next_up_enabled", "value": true, "source": "default" }, { "key": "playback.audio_language", "value": null, "source": "default" }, { "key": "ui.app_language", "value": null, "source": "default" } ] diff --git a/contracts/settings/v1/manifest.json b/contracts/settings/v1/manifest.json index 8c3e9f897e..2d1f4b12a5 100644 --- a/contracts/settings/v1/manifest.json +++ b/contracts/settings/v1/manifest.json @@ -1,6 +1,6 @@ { "api_version": 1, - "revision": 29, + "revision": 30, "option_sets": { "playback_audio_languages": { "type": "language_tag", @@ -742,6 +742,20 @@ "recommended_control": "slider", "notes": "Android currently writes player.next_up_prompt_seconds. That alias is migrated to this key and removed from production writes." }, + { + "key": "playback.next_up_enabled", + "introduced_in": 30, + "persistence": "remote", + "allowed_scopes": ["profile", "profile_device"], + "resolution_order": ["profile_device", "profile", "default"], + "value_schema": { "type": "boolean" }, + "default_value": true, + "category": "playback", + "label": "Show Next Up", + "description": "Show the Next Up card near the end of an episode.", + "recommended_control": "switch", + "notes": "false turns Next Up off: no card before or at the end of an episode, no countdown and no automatic next episode, whatever playback.auto_play_next says. The episode plays to its end and the player closes as its Close action does. playback.next_up_prompt_seconds only applies while this is true. Clients may show the two as one picker with an Off choice. A client that predates this key keeps showing Next Up." + }, { "key": "catalog.metadata_language", "introduced_in": 1, diff --git a/docs/settings-api.md b/docs/settings-api.md index d037de3654..5e8ff51ac2 100644 --- a/docs/settings-api.md +++ b/docs/settings-api.md @@ -1165,3 +1165,23 @@ not extend the Jellyfin protocol. How each client matches, loads and applies the language is in [the client translation architecture](architecture/i18n.md). + +## Next Up + +Two settings decide when the Next Up card opens near the end of an episode. Both are stored at +`profile` or `profile_device` and resolved `profile_device` → `profile` → `default`. + +- `playback.next_up_prompt_seconds` (integer, 0–120, default 30) is how many seconds before the + end of the file the card opens. It counts from the file's end, never from a credits marker; 0 + ("At end") opens it only when playback ends. Credits markers drive Skip Credits; skipping + credits that run to the end of the file ends playback, which opens the card. Clients differ on + playback that lands inside the window: Apple and the web open the card there, while Android opens it only + when forward playback crosses the point, so a resume or seek past it waits for the end. +- `playback.next_up_enabled` (boolean, default true, revision 30) turns Next Up off when false: + no card before or at the end, no countdown, and no automatic next episode whatever + `playback.auto_play_next` says. The episode plays to its end and the player closes as its Close action does. + `next_up_prompt_seconds` applies only while this is true, so a client may present both as one + picker whose choices are Off, At end and the seconds values. A client that predates the key keeps + showing Next Up. + +Jellyfin clients run their own Next Up; this does not extend the Jellyfin protocol. diff --git a/internal/settingskeys/keys.go b/internal/settingskeys/keys.go index 4bbba8ccbd..be3ccd86d3 100644 --- a/internal/settingskeys/keys.go +++ b/internal/settingskeys/keys.go @@ -9,7 +9,7 @@ package settingskeys // Revision is the manifest revision these bindings were generated from. -const Revision = 29 +const Revision = 30 // Setting keys, one constant per definition. const ( @@ -59,6 +59,8 @@ const ( PlaybackIntroSkipMode = "playback.intro_skip_mode" // Maximum bitrate PlaybackMaxBitrateKbps = "playback.max_bitrate_kbps" + // Show Next Up + PlaybackNextUpEnabled = "playback.next_up_enabled" // Next up prompt PlaybackNextUpPromptSeconds = "playback.next_up_prompt_seconds" // Preferred quality @@ -190,6 +192,7 @@ var Remote = []string{ PlaybackCellularPreferredQuality, PlaybackIntroSkipMode, PlaybackMaxBitrateKbps, + PlaybackNextUpEnabled, PlaybackNextUpPromptSeconds, PlaybackPreferredQuality, PlaybackShowForcedSubtitles, diff --git a/web/src/lib/deviceSettingGroups.ts b/web/src/lib/deviceSettingGroups.ts index c269b13fa0..0f343ef097 100644 --- a/web/src/lib/deviceSettingGroups.ts +++ b/web/src/lib/deviceSettingGroups.ts @@ -97,8 +97,10 @@ const EXPLICIT_GROUPS: Partial> = { * and Navigation & Cards screens, which already edit them at profile scope; showing them here would * give one setting two homes. `ui.library_page_state` is remembered browse * state rather than a preference — it has no control in the manifest at all. + * `playback.next_up_enabled` stays off until the web player applies it. */ const HIDDEN_KEYS = new Set([ + "playback.next_up_enabled", "ui.app_language", "ui.theme", "ui.text_scale", diff --git a/web/src/lib/settingsConformance.json b/web/src/lib/settingsConformance.json index e279d86985..2186cb3145 100644 --- a/web/src/lib/settingsConformance.json +++ b/web/src/lib/settingsConformance.json @@ -1,6 +1,6 @@ { "fixture_version": 1, - "manifest_revision": 29, + "manifest_revision": 30, "description": "Cross-platform conformance cases for settings resolution. Every case runs against the shipped manifest in this directory: definitions are referenced by key, never restated, so an expectation can only be satisfied by resolving the real contract. Each platform's resolver (Go in internal/settingsresolve, TypeScript in web/src/lib/settingsResolve.ts, Kotlin and Swift in the client repos) runs every case through a hand-written runner; a runner must fail on any fixture field it does not know, because schema drift in the fixture itself is drift. A case's constraint_bindings attach a constraint to a copy of a real definition so constraint semantics stay testable even while no shipped definition carries that constraint kind. In expected entries, constrained:true requires stored_value and constraint_kind to be present, and stored_value may be null to mean the authored value was JSON null.", "cases": [ { @@ -383,6 +383,7 @@ "playback.subtitle_mode", "playback.show_forced_subtitles", "playback.next_up_prompt_seconds", + "playback.next_up_enabled", "playback.audio_language", "ui.app_language" ], @@ -391,6 +392,7 @@ { "key": "playback.subtitle_mode", "value": "auto", "source": "default" }, { "key": "playback.show_forced_subtitles", "value": true, "source": "default" }, { "key": "playback.next_up_prompt_seconds", "value": 30, "source": "default" }, + { "key": "playback.next_up_enabled", "value": true, "source": "default" }, { "key": "playback.audio_language", "value": null, "source": "default" }, { "key": "ui.app_language", "value": null, "source": "default" } ] diff --git a/web/src/lib/settingsContract.ts b/web/src/lib/settingsContract.ts index 50855cf5b1..2f947f102a 100644 --- a/web/src/lib/settingsContract.ts +++ b/web/src/lib/settingsContract.ts @@ -9,7 +9,7 @@ */ export const SETTINGS_API_VERSION = 1; -export const SETTINGS_REVISION = 29; +export const SETTINGS_REVISION = 30; export interface SettingSuggestedOption { value: string; @@ -239,6 +239,8 @@ export const SETTING_KEYS = { PLAYBACK_INTRO_SKIP_MODE: "playback.intro_skip_mode", /** Maximum bitrate */ PLAYBACK_MAX_BITRATE_KBPS: "playback.max_bitrate_kbps", + /** Show Next Up */ + PLAYBACK_NEXT_UP_ENABLED: "playback.next_up_enabled", /** Next up prompt */ PLAYBACK_NEXT_UP_PROMPT_SECONDS: "playback.next_up_prompt_seconds", /** Preferred quality */ @@ -804,6 +806,21 @@ export const SETTING_DEFINITIONS: Record = { minimum: 100, maximum: 200000, }, + "playback.next_up_enabled": { + key: "playback.next_up_enabled", + type: "boolean", + nullable: false, + persistence: "remote", + introducedIn: 30, + scopes: ["profile", "profile_device"], + scopeIntroducedIn: [30, 30], + resolutionOrder: ["profile_device", "profile", "default"], + defaultValue: true, + label: "Show Next Up", + description: "Show the Next Up card near the end of an episode.", + category: "playback", + control: "switch", + }, "playback.next_up_prompt_seconds": { key: "playback.next_up_prompt_seconds", type: "integer",