Episodes and unavailable items crash sorting and duplication #13

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

Spotify playlist items are a union of tracks and episodes. The track pointer is also nil when content is unavailable in the selected market.

  • Sorting dereferences the pointer without checking it in GroupTracksByArtist(), with further unchecked dereferences in album grouping, track sorting, and reordering.
  • FilterLocalTracks() retains non-local episodes and unavailable items. AddTracksToPlaylist() subsequently dereferences their nil track pointer.

In the duplication flow, the destination playlist has already been created before this panic, so the failure can leave an unwanted empty playlist behind.

Focused probes confirmed that an episode panics in artist grouping and that both an episode and an unavailable item survive FilterLocalTracks.

Spotify playlist items are a union of tracks and episodes. The track pointer is also `nil` when content is unavailable in the selected market. - Sorting dereferences the pointer without checking it in `GroupTracksByArtist()`, with further unchecked dereferences in album grouping, track sorting, and reordering. - `FilterLocalTracks()` retains non-local episodes and unavailable items. `AddTracksToPlaylist()` subsequently dereferences their nil track pointer. In the duplication flow, the destination playlist has already been created before this panic, so the failure can leave an unwanted empty playlist behind. Focused probes confirmed that an episode panics in artist grouping and that both an episode and an unavailable item survive `FilterLocalTracks`.
faceguy self-assigned this 2026-08-22 20:29:36 +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#13
No description provided.