Skip to content

fix(settings): carry mediaSegmentActions in the sync profile - #253

Open
ken-r-smith wants to merge 1 commit into
Moonfin-Client:masterfrom
ken-r-smith:feat/sync-media-segment-actions
Open

fix(settings): carry mediaSegmentActions in the sync profile#253
ken-r-smith wants to merge 1 commit into
Moonfin-Client:masterfrom
ken-r-smith:feat/sync-media-segment-actions

Conversation

@ken-r-smith

Copy link
Copy Markdown

Pull Request

Summary

MoonfinSettingsProfile declares every field it will accept and carries no
[JsonExtensionData], so any key it does not name is dropped during
deserialisation. mediaSegmentActions was never declared, which means a client
can push the value but the profile will not store or return it.

Its two neighbours are already carried:

[JsonPropertyName("mediaSegmentCountdown")]publicstring?MediaSegmentCountdown{get;set;}[JsonPropertyName("mediaSegmentAutoHide")]publicstring?MediaSegmentAutoHide{get;set;}

So the countdown shown on a skip prompt, and how long the button lingers, both
follow the user between clients — while the setting that decides whether the
prompt appears at all does not. That looks like an oversight rather than a
decision, which is what this fixes.

Related Issues

Companion to the Moonfin-Core PR adding per media segment type actions. That one
registers mediaSegmentActions in syncedFields; without the property here, the
client pushes the value and the server discards it. The client change is useful
on its own — this is what makes the choice follow the account instead of being
re-set on every device.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • UI/UX update
  • Documentation update
  • Build/CI change
  • Other (describe):

Changes Made

  • Added mediaSegmentActions as a nullable string to the Jellyfin profile model,
    beside mediaSegmentCountdown.
  • Added the same to the Emby profile model, matching that file's single line
    property style.

The client stores this as a comma separated type:action string
(intro:askToSkip,recap:askToSkip,outro:skip), so string? matches its two
neighbours. No merge or override logic references these properties by name, so
declaring them is all that is needed.

Platform

  • Android
  • iOS
  • tvOS
  • Web
  • macOS
  • Windows
  • Linux
  • All / Shared code

Testing

  • Tested on emulator / simulator
  • Tested on physical device
  • Manual testing completed
  • Not tested (explain why):

I do not have a .NET toolchain set up for this repository, so this has not been
compiled. It is two property declarations with no logic, mirroring the
mediaSegmentCountdown lines directly above them in both files. Happy to have CI
or a maintainer confirm the build, or to test a plugin build against a live
Jellyfin 10.11.11 server if that is useful.

Test Steps

  1. Build and install the plugin.
  2. In a Moonfin client, set a media segment type to Prompt User or Skip.
  3. Confirm the value appears in the stored settings profile.
  4. Sign in on a second client and confirm the same choice is applied.

Screenshots

Not applicable, no user facing surface.

Checklist

  • Code builds successfully
  • Code follows project style and conventions
  • No unnecessary commented-out code
  • No new warnings introduced

MoonfinSettingsProfile names every field it will accept and has no
JsonExtensionData, so a key it does not declare is dropped during
deserialisation. mediaSegmentActions was never declared, which meant the
client could push the value but the profile would never store or return it.
Its two neighbours, mediaSegmentCountdown and mediaSegmentAutoHide, are
already carried, so the setting that decides whether a skip prompt appears
was the only one of the three that did not follow the user between clients.
Added to the Jellyfin and Emby profiles alike, as a nullable string matching
the client's comma separated `type:action` value. No merge logic references
these properties by name, so declaring them is all that is required.
Pairs with Moonfin-Core: per type media segment actions (#821).
CopilotAI lite review requested due to automatic review settings August 23, 2026 05:03

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes settings sync persistence by adding a missing mediaSegmentActions field to the server-side MoonfinSettingsProfile models, preventing the value from being dropped during JSON deserialization and ensuring it round-trips between clients.

Changes:

  • Added mediaSegmentActions (string?) to the Jellyfin MoonfinSettingsProfile model with the correct JsonPropertyName.
  • Added the same mediaSegmentActions property to the Emby MoonfinSettingsProfile model, matching the existing single-line property style.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
Jellyfin/backend/Models/MoonfinSettingsProfile.csAdds mediaSegmentActions JSON-mapped property so the Jellyfin backend persists and returns the synced value.
Emby/Emby.Plugins.Moonfin/Models/MoonfinSettingsProfile.csAdds the same mediaSegmentActions JSON-mapped property for the Emby plugin backend to persist and return the value.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ken-r-smith