AddTracksToPlaylist panics when progress is omitted #20

Open
opened 2026-08-22 20:34:12 +00:00 by faceguy · 0 comments
Owner

The function accepts a ui.Progress interface and guards Start and Finish when it is nil, but calls progress.Advance unconditionally at internal/spotify/playlist.go#L136. A caller that omits progress receives a nil-interface panic after the first successful batch.

A Spotify-shaped test server returning a successful add-tracks response reproduced the panic with one track and progress == nil.

The function accepts a `ui.Progress` interface and guards `Start` and `Finish` when it is nil, but calls `progress.Advance` unconditionally at `internal/spotify/playlist.go#L136`. A caller that omits progress receives a nil-interface panic after the first successful batch. A Spotify-shaped test server returning a successful add-tracks response reproduced the panic with one track and `progress == nil`.
faceguy self-assigned this 2026-08-22 20:34:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
faceguy/my-spotify-playlist-sorter-go#20
No description provided.