spotify2tidal / spotify_to_tidal

A command line tool for importing your Spotify playlists into Tidal
GNU Affero General Public License v3.0
238 stars 44 forks source link

Create file with all songs that could not be synced #13

Open Tristan2357 opened 1 year ago

Tristan2357 commented 1 year ago

Maybe this could create a csv with the columns title, artist, spotifyId, playlist maybe album. To either help find the titles if they are just named slightly different or to at least know which songs you lost, without having create such a file from the console output.

timrae commented 1 month ago

This would be a great feature. As of version 0.1.0 there is now a TrackMatchCache (see cache.py source code) which will contain all of the spotify track ids which were matched during the sync operation. So at the end of the sync you could iterate through all the spotify tracks in all the spotify playlists, and find which tracks failed to match by checking if they are in the cache or not. There is also a MatchFailureDatabase class there, however I would advise against using that as it will be less efficient than the other approach.

Probably the best way to show this information to the user would be as an html table for each playlist, where each row of the table contains the metadata such as artist / track / album, etc. For example the python module tabulate might be useful for generating an html page with all this information.

If anyone is interested in submitting a PR for this feature, I would just ask that the code for this should be in a new module (e.g. a new file report.py), not lumped together with the existing sync code. I would strongly encourage putting up a WIP PR with a prototype to seek early feedback before investing a lot of time into a specific approach.