sigma67 / ytmusicapi

Unofficial API for YouTube Music
https://ytmusicapi.readthedocs.io
MIT License
1.76k stars 209 forks source link

trackCount dictionary key from YTMusic.get_playlist returns 1 #658

Closed ladymileva closed 1 month ago

ladymileva commented 1 month ago

Thank you so much for the ytmusicapi, I used it for a script that removes the currently playing song from a playlist.

For one of my playlists (it is working as expected for all the others) the trackCount dictionary key from YTMusic.get_playlist returns 1.

To reproduce: from ytmusicapi.ytmusic import YTMusic

playlistId = <'id_string'> playlist = ytmusic.get_playlist(playlistId,None) trackCount = playlist.get('trackCount') trackCount always equals 1 for this playlist, even if I specify a value instead of "None" for the number of tracks to retrieve info for. I can retrieve the proper track count by using: trackinfo = playlist.get('tracks') trackCount = len(trackinfo) I'm not sure why this playlist behaves differently than the others. It may helpful to note that the playlist was created over a year ago, has over 1000 tracks, and the playlistId end with an underscore.
sigma67 commented 1 month ago

this has been fixed already, duplicate of https://github.com/sigma67/ytmusicapi/issues/650