

@staticmethod
@ffi.callback('void(sp_playlist *playlist, int *tracks, int num_tracks, int position, void *userdata)')
def tracks_moved(sp_playlist, old_indexes, num_tracks, new_index, userdata):
    logger.debug('Tracks moved within playlist')
    playlist = Playlist._cached(spotify._session_instance, sp_playlist, add_ref=True)
    old_indexes = [int(old_indexes[i]) for i in range(num_tracks)]
    playlist.emit(PlaylistEvent.TRACKS_MOVED, playlist, old_indexes, int(new_index))

dataset/ETHPy150Open mopidy/pyspotify/spotify/playlist.py _PlaylistCallbacks.tracks_moved/original