Skip to content

fix(spotify): map Pathfinder track metadata#26

Merged
steipete merged 1 commit into
openclaw:mainfrom
theDimZone:fix-pathfinder-track-metadata
May 9, 2026
Merged

fix(spotify): map Pathfinder track metadata#26
steipete merged 1 commit into
openclaw:mainfrom
theDimZone:fix-pathfinder-track-metadata

Conversation

@theDimZone
Copy link
Copy Markdown
Contributor

I wanted to use spogo for my tool and have noticed that it doesn't show duration in json output. Fixed it with heavy codex assistance.

Summary

This fixes missing track metadata when playlist, library, and track info results come from Spotify's Pathfinder payloads.

Pathfinder does not always expose track duration as top-level duration_ms or durationMs. Depending on the endpoint, it can be nested under duration.totalMilliseconds or trackDuration.totalMilliseconds.

A few other track fields also use Pathfinder-specific shapes:

  • explicit metadata comes from contentRating.label
  • playability comes from playability.playable

This PR adds support for those shapes, and keeps explicit: false visible in JSON when we know the value is actually present.

@steipete steipete merged commit f2bc3d3 into openclaw:main May 9, 2026
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