Skip to content

fix: restore library tracks via fetchLibraryTracks#16

Merged
steipete merged 2 commits into
openclaw:mainfrom
masonc15:fix/library-tracks-broken-filter
May 5, 2026
Merged

fix: restore library tracks via fetchLibraryTracks#16
steipete merged 2 commits into
openclaw:mainfrom
masonc15:fix/library-tracks-broken-filter

Conversation

@masonc15
Copy link
Copy Markdown
Contributor

@masonc15 masonc15 commented Mar 13, 2026

Problem

spogo library tracks list could return an empty success from the Connect client.

The previous implementation queried libraryV3 with the Songs filter. In current Spotify responses, that request behaves like an invalid liked-songs path: the payload can include LibraryInvalidFilterIdError while still decoding to zero items, so the web API fallback never activates.

Liked songs are available through fetchLibraryTracks for spotify:collection:tracks, but that operation returns a different shape: data.me.library.tracks.items[].track.data, with _uri on the track wrapper rather than inside data.

Changes

  • Switch libraryTracks() from libraryV3 to fetchLibraryTracks with spotify:collection:tracks.
  • Add a dedicated extractor for the fetchLibraryTracks payload and inject _uri into the extracted track data before mapping.
  • Treat missing or malformed fetchLibraryTracks payloads as errors so LibraryTracks() falls back to the web API instead of silently returning an empty result.
  • Tighten tests to validate the fetchLibraryTracks request variables and cover the fallback path when the response shape drifts.

Testing

  • go test ./...
  • Manually verified spogo library tracks list --limit 5
  • Manually verified spogo library tracks list --limit 3 --json

@masonc15 masonc15 force-pushed the fix/library-tracks-broken-filter branch from 58616e5 to ab0625f Compare March 13, 2026 02:10
@masonc15 masonc15 force-pushed the fix/library-tracks-broken-filter branch from ab0625f to 61e6e9e Compare March 13, 2026 02:15
@masonc15 masonc15 marked this pull request as ready for review March 13, 2026 05:19
@masonc15 masonc15 changed the title fix: library tracks broken by Spotify dropping Songs filter fix: restore library tracks via fetchLibraryTracks Mar 13, 2026
@steipete steipete merged commit dfc7bed into openclaw:main May 5, 2026
1 check passed
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.

2 participants