Skip to content

Fix QC playlist cleanup#42

Merged
salmanfarisvp merged 1 commit into
masterfrom
fix/qc-playlist-cleanup
Jul 17, 2026
Merged

Fix QC playlist cleanup#42
salmanfarisvp merged 1 commit into
masterfrom
fix/qc-playlist-cleanup

Conversation

@salmanfarisvp

@salmanfarisvp salmanfarisvp commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • fetch label associations before deleting a QC playlist
  • unlink each association using both label_id and playlist_id, as required by the v4.1 API
  • delete the playlist without explicitly deleting its playlist items

Root cause

The API rejects label-association deletion when only playlist_id is supplied. The cleanup returned early after that 400 response, so every scheduled run created another QC playlist without removing the previous one.

Scope

Cleanup continues to select playlists whose titles start with the QC prefix. Other playlist titles are not selected.

Test plan

  • Validated Python syntax with ast.parse
  • Checked the diff for whitespace errors
  • Confirmed the corrected API sequence against the account by removing 165 accumulated QC playlists with zero failures
  • Run the automated QC workflow and confirm the previous QC playlist is removed before the next one is created

Unlink each label association with the API-required label and playlist filters so script-created QC playlists can be removed without explicitly deleting their items.
@salmanfarisvp
salmanfarisvp merged commit be803e5 into master Jul 17, 2026
9 of 10 checks passed
@salmanfarisvp
salmanfarisvp deleted the fix/qc-playlist-cleanup branch July 17, 2026 17:04
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