streamrip
streamrip copied to clipboard
feat: get alternatives
Sometimes tracks aren't available anymore because of rights.
This PR fetches alternative tracks if they are defined, if not it fetches alternative albums and looks for the same track.
I tested this with a playlist of mine which has tracks which have now new albums ID's.
With version 2.1.0, I can download 68/95 tracks. With fetching alternatives, I can download 89/95 tracks.
Playlist: https://www.deezer.com/us/playlist/10310080842
Errors without fetching the alternatives:
ERROR Persistent error downloading track 'Камикадзе', skipping: Cannot connect to host e-cdns-proxy-0.dzcdn.net:443 ssl:True [SSLCertVerificationError: (1, '[SSL: track.py:68
CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1000)')]
ERROR Error downloading track: [Errno 2] No such file or directory: '/home/mandy/StreamripDownloads/Guitar - Drop B/26. Stigmata - Камикадзе.mp3' playlist.py:130
ERROR Error downloading track 'Магмель', retrying: Cannot connect to host e-cdns-proxy-1.dzcdn.net:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] track.py:52
certificate verify failed: self-signed certificate (_ssl.c:1000)')]
ERROR Persistent error downloading track 'Магмель', skipping: Cannot connect to host e-cdns-proxy-1.dzcdn.net:443 ssl:True [SSLCertVerificationError: (1, '[SSL: track.py:68
CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1000)')]
ERROR Error downloading track: [Errno 2] No such file or directory: '/home/mandy/StreamripDownloads/Guitar - Drop B/29. Stigmata - Магмель.mp3' playlist.py:130
ERROR Error downloading track 'At War', retrying: Cannot connect to host e-cdns-proxy-e.dzcdn.net:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] track.py:52
certificate verify failed: self-signed certificate (_ssl.c:1000)')]
One of the tracks is this on: https://www.deezer.com/us/track/91337844
The album doesn't exist anymore, but the track is still on another album available, with that fix in place:
I can download 93/95 tracks.