From b8de0f90f0f819e5ecb9fcc6a13fee915cd578c4 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 14 Jun 2026 19:06:56 +0200 Subject: [PATCH] feat(player): allow playing a Library folder (queue it) so next/prev work (refs #501) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DLNA STORED_MUSIC playback stopped after one track and next/previous did nothing: the Library UI only offered a play button on individual tracks and always selected with type "track", so the speaker had no queue to advance through (next/prev send the NEXT_TRACK/PREV_TRACK key, which needs a queue). - playEntry now passes the entry's own type, so selecting a folder uses the container type ("dir") instead of "track" — letting the speaker queue the folder for next/previous + auto-advance. - show the play button on folders too (title "Play folder"), in addition to navigating into them. Server-side needs no change: HandlePlayLibrary already forwards the type to the speaker's /select. Whether a given firmware queues a container select is to be confirmed on hardware (testable with cmd/example-dlna-server). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../soundtouchweb/static/js/components/Library.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/service/soundtouchweb/static/js/components/Library.js b/pkg/service/soundtouchweb/static/js/components/Library.js index 694de28..d8d4222 100644 --- a/pkg/service/soundtouchweb/static/js/components/Library.js +++ b/pkg/service/soundtouchweb/static/js/components/Library.js @@ -96,10 +96,13 @@ export function Library({ devices }) { } async function playEntry(entry) { + // Pass the entry's own type so a folder selects as a container ("dir") + // rather than a single track — that lets the speaker queue the folder so + // next/previous and auto-advance work, instead of stopping after one item. await api.libraryPlay(deviceId, { account: server.account, location: entry.location, - type: 'track', + type: entry.type || 'track', name: entry.name, }); setPlayingName(entry.name); @@ -251,10 +254,10 @@ export function Library({ devices }) { ${entry.name} ${entry.type ? html`${entry.type}` : null} - ${entry.playable && !entry.isDir ? html` + ${entry.playable || entry.isDir ? html` ` : null}