ytmusicapi icon indicating copy to clipboard operation
ytmusicapi copied to clipboard

subscribe_artists only appears to allow subscribing to a single artist but function accepts a list

Open nick42d opened this issue 8 months ago • 1 comments

  • [x] I confirm that I have read the FAQ

Describe the bug

It appears that from the Google side, subscribe_artists throws a 400 error if more than 1 channel_id is provided. unsubscribe_artists still allows multiple.

I propose subscribe_artists be renamed to subscribe_artist, and modified to accept a single string channel id (instead of a list).

ytmusicapi version

1.10.3-1

To Reproduce

// UCMyqqExD7o8zVB5SDUhhuCQ - The Dung Beatles
// UCwMzxvcq8VmfclCG6QUTm7g - Clube Big Beatles

// This works - doesn't matter if artist is subscribed or unsubscribed from youtube side
ytmusic.subscribe_artists(["UCMyqqExD7o8zVB5SDUhhuCQ"])
// This works - doesn't matter if artist is subscribed or unsubscribed from youtube side
ytmusic.subscribe_artists(["UCwMzxvcq8VmfclCG6QUTm7g"])
// This doesn't work - 400 error - even if both artists are unsubscribed from youtube side
ytmusic.subscribe_artists(["UCMyqqExD7o8zVB5SDUhhuCQ", "UCwMzxvcq8VmfclCG6QUTm7g"])

// This still works
ytmusic.unsubscribe_artists(["UCMyqqExD7o8zVB5SDUhhuCQ", "UCwMzxvcq8VmfclCG6QUTm7g"])

nick42d avatar Jul 04 '25 14:07 nick42d

I can confirm this. The inconsistency between subscribe and unsubscribe is quite strange though.

sigma67 avatar Jul 24 '25 19:07 sigma67