You need Python 2.7.x. Download, install. You take the file vk_music_organizer.py from the archive, open it in notepad, at the very beginning write email = '...' and password = '...' and your password and login respectively. Save. If you have Python installed correctly, then after that it is enough just to run this file with a double click.
How does it work?
The sorting algorithm is as follows:
To break all the tracks into albums, if the user has them, throw all tracks without the specified album into one untitled album. All albums sorted alphabetically, nameless put first.
Go through all the tracks within each album and the chains of tracks in a row with one artist join in clusters.
Inside each album, for all the artists met, find the largest cluster with them. From the same size select the first in the list.
Drag all tracks that are not in the largest cluster of your artist to this cluster.
Combine all the clusters within each album. Combine all albums.
In addition to sorting there is nothing particularly meaningful. I use the authorizer and API call code from this article. Apart from sorting, the work of the program is limited to one request to audio.get , one to audio.getAlbums and a bunch to audio.reorder . Free bonus: all tracks that fall under the harsh copyright hand are sent to the basement.
The script is provided as is, with all the bugs and flaws. Use at your own risk. Enjoy!