-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playlist 'trackCount' returning unexpected value #365
Comments
Looking at the web interface, looks like the playlists have a new field called "views". For me, the "trackCount" value matches the "view" value on the web interface |
The "get_playlist" function also uses the "trackCount" value to orient itself. |
I'm not able to reproduce. For me the playlist you provided has a |
This is exactly it. I've tried multiple playlists. If it says "8.5K views",
I've figured it out. This bug seems to only happen on playlists that you have created. If you use someone else's playlist, This is the code that needs to be updated. ytmusicapi/ytmusicapi/mixins/playlists.py Lines 136 to 137 in 19ad424
The Here it is when it is someone else's playlist:
And here it is when it is your own:
Using the [0] index will return the wrong value for your own playlist. Maybe the length of the |
This also means that the following lines need to be fixed as well: ytmusicapi/ytmusicapi/mixins/playlists.py Lines 138 to 139 in 19ad424
|
I see, they've added view counts to playlists. Will adjust accordingly. |
I was hit by sigma67/ytmusicapi#365.
When using the
YTMusic.get_playlist
method (documentation), getting thetrackCount
value from the returned playlist object seems to return an unexpected value. This has only recently started happening.For example, the playlist ID "PLnlxKMP5GzKCXJ3Cw99qSWgC01cuhTFxG" has 100 songs. However,
playlist['trackCount']
returns 13, whilelen(playlist['tracks'])
returns the correct value of 100. This issue first started appearing on March 22, 2023. Before then,trackCount
would return the same value as the length oftracks
, as expected. I've tried multiple playlist, and none of thetrackCount
values match up with the number of songs in the playlist. Did YouTube update whattrackCount
means?The text was updated successfully, but these errors were encountered: