Skip to content

add Preset editor#896

Open
tmalch wants to merge 3 commits into
kaaholst:developfrom
tmalch:preset-editor
Open

add Preset editor#896
tmalch wants to merge 3 commits into
kaaholst:developfrom
tmalch:preset-editor

Conversation

@tmalch

@tmalch tmalch commented Jul 21, 2026

Copy link
Copy Markdown

This adds a Presets Editor to Squeezer so presets can be viewed and assigned from the
app, mirroring the web editor. It reuses parts of the Alarm settings view.

Disclosure: This is my first ever android code, it is mainly written by AI. I reviewed it and the changes seem reasonable.
Request for review, comments and merge. Thanks!

What it adds

  • Presets screen (PresetsActivity): shows the 6 preset slots for the active player,
    each with its current assignment and a play button to test it. Tap
    a slot to assign a favorite/playlist from the same categorized picker used by the
    alarm playlist screen. Reachable from the Now Playing overflow menu and from
    Home > Settings, next to Alarms.
  • Reads presets from the existing status subscription: the player status request
    already includes menu:menu, which makes the server return preset_data — this was
    previously received but ignored. No new request needed.
  • Writes presets via the jivefavorites set_preset command (the same one the web
    editor and SqueezePlay-based players use).
  • Minor refactor: the alarm-playlist picker (AlarmPlaylistActivity and its two
    adapters) took an Alarm purely to read its playListId for highlighting the current
    selection. Generalized it to take a plain URL string so both alarms and presets can
    share it.

Open

  • Clearing an assigned slot isn't possible yet — no sure if needed;
  • Terminology inconsistency noticed in existing translations: the new Presets screen
    reuses server-string tokens (e.g. PRESETS_NOT_DEFINED) pulled verbatim from LMS's own
    translations via updateSlimStrings. In English, German these translate to "preset" literally (German "Voreinstellung"),
    while the existing, independently translated home-screen widget strings (remote_presetNDescription)
    call the same buttons "favorite" instead (German "Favoritentaste").

tmalch added 3 commits July 20, 2026 09:43
Decouples the playlist picker from the Alarm model so it can be reused
by other callers that need to pick a playlist/favorite by URL, such as
the upcoming preset editor.
Lets the user assign favorites to the player's preset buttons, mirroring
the presets editor of the LMS web interface. Reads presets from the
"preset_data" field of the status response and writes them via the
"jivefavorites set_preset" command.

Items without a URL (e.g. "Use current playlist") are excluded from the
picker since a preset requires one.
Sign up for free to 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.

1 participant