[GH-ISSUE #116] Adding playlists [Question] #83

Closed
opened 2026-02-27 22:07:55 +03:00 by kerem · 1 comment
Owner

Originally created by @phirestalker on GitHub (Dec 7, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/116

When creating a playlist, will ytmusicapi inform me if the playlist already exists?
If not, what is the best way to check for an existing playlist before creating it. I could obviously use get_library_playlists and loop through, but there must be a more efficient way?

Originally created by @phirestalker on GitHub (Dec 7, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/116 When creating a playlist, will ytmusicapi inform me if the playlist already exists? If not, what is the best way to check for an existing playlist before creating it. I could obviously use get_library_playlists and loop through, but there must be a more efficient way?
kerem closed this issue 2026-02-27 22:07:56 +03:00
Author
Owner

@sigma67 commented on GitHub (Dec 8, 2020):

There is no such thing as duplicate playlists. How would you determine that a new playlist is a duplicate? Based on the title? You can create two playlists with the same title, they would just have different playlist ids.

The API doesn't check for duplicates when creating new playlists, so yes, you'd have to do it yourself by using get_library_playlists beforehand.

<!-- gh-comment-id:740465921 --> @sigma67 commented on GitHub (Dec 8, 2020): There is no such thing as duplicate playlists. How would you determine that a new playlist is a duplicate? Based on the title? You can create two playlists with the same title, they would just have different playlist ids. The API doesn't check for duplicates when creating new playlists, so yes, you'd have to do it yourself by using get_library_playlists beforehand.
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
starred/ytmusicapi#83
No description provided.