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
Error while reordering a playlist with reorder_tracks : TypeError: int() not supported on cdata 'sp_track *' #134
Comments
This looks like a very similar bug to #128 and needs the same fix. Can the tests not catch stuff like this? EDIT: Also, the parameter name |
p.s. same with the callback docs. |
Ahh right, I've just found the changelog entry regarding these parameter names. So this is on purpose
For example:
And running
So it's moved track[1] to position 3 rather than (zero-based) index 3. |
Ooh I get it now! I thought it was expecting a |
@becspam just to be clear, Your second example is called correctly but fails due to the bug in pyspotify. |
Fair enough! |
Given that >>> tracks = ['a', 'b', 'c', 'd', 'e']
>>> tracks[1]
'b'
>>> tracks.insert(3, 'b')
>>> tracks
['a', 'b', 'c', 'b', 'd', 'e']
>>> del tracks[1]
>>> tracks
['a', 'c', 'b', 'd', 'e'] |
I guess I was thinking about it the other way around: a removal followed be an insert. But your way makes sense. Sorry for the noise |
Hi,
I'm trying to reorder a playlist I retrieved, but keep on getting the following error :
The code is reordering a playlist retrieved previously:
with tracksToSortIndex being a list of index [2, 1, 0, 3, 5, 4, 6] the same size as the playlist.tracks playlist.
The tracks is a valid list of track :
This also happens if I reorder a specific task:
Any idea where this error comes from?
The text was updated successfully, but these errors were encountered: