Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion contracts/settings/v1/conformance.json
Original file line number Diff line number Diff line change
@@ -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": [
{
Expand Down Expand Up @@ -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"
],
Expand All @@ -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" }
]
Expand Down
16 changes: 15 additions & 1 deletion contracts/settings/v1/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"api_version": 1,
"revision": 29,
"revision": 30,
"option_sets": {
"playback_audio_languages": {
"type": "language_tag",
Expand Down Expand Up @@ -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,
Expand Down
20 changes: 20 additions & 0 deletions docs/settings-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
`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.
5 changes: 4 additions & 1 deletion internal/settingskeys/keys.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions web/src/lib/deviceSettingGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ const EXPLICIT_GROUPS: Partial<Record<string, DeviceSettingGroupId>> = {
* 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<string>([
"playback.next_up_enabled",
"ui.app_language",
"ui.theme",
"ui.text_scale",
Expand Down
4 changes: 3 additions & 1 deletion web/src/lib/settingsConformance.json
Original file line number Diff line number Diff line change
@@ -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": [
{
Expand Down Expand Up @@ -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"
],
Expand All @@ -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" }
]
Expand Down
19 changes: 18 additions & 1 deletion web/src/lib/settingsContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -804,6 +806,21 @@ export const SETTING_DEFINITIONS: Record<SettingKey, SettingDefinition> = {
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"],
Comment on lines +809 to +815

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Bug high

Web playback ignores the profile-wide Next Up off setting

A profile-level false set by another client is ignored, so the web player can still display Next Up and auto-play. Read the effective playback.next_up_enabled value and suppress both the card and automatic advancement when it is false.

Prompt for LLM
File web/src/lib/settingsContract.ts, lines 809-815:

Web playback ignores the profile-wide Next Up off setting

A profile-level `false` set by another client is ignored by the web player, which still displays Next Up and can auto-play despite the new setting's contract. Read the effective `playback.next_up_enabled` value in the player and suppress both the card and automatic advancement when it is false.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bug in this PR. This PR adds the setting to the contract and keeps it off the web device settings screen (deviceSettingGroups HIDDEN_KEYS). The web player and settings picker apply it in #4503, which stacks on this one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. The suggestion is out of scope for PR #4501: this PR adds the contract key and hides it from device settings, while the stacked PR #4503 implements the web player and settings picker behavior.

I withdraw the finding for this PR.

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",
Expand Down
Loading