-
Notifications
You must be signed in to change notification settings - Fork 97
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
Ripping playlists? #42
Comments
I've got the same problem. A possible workaround is, to select all the songs from the playlist and just hit Edit: And obviously put them in a .txt file and give the spotify-ripper the path to the file |
@hedwiggggg thanks for the workaround. |
i'm trying to find the root cause of this error. Does anyone have a clue ? |
I'm trying as well. There is no error in the script so the loaded playlist
seems to be empty. In my system i get the" Loading playlist..." message
twice then the script exits without an error.
Over at the mopidy repository they are working on the issue as well and
already have a workaround. Don't know if it can anyhow be implemented
here...
Granville Paut <[email protected]> schrieb am Fr., 19. Okt. 2018,
05:57:
… i'm trying to find the root cause of this error. Does anyone have a clue ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATJ17dE99tWFDEjZahqyfCsirEnKO_Z_ks5umU2agaJpZM4XZoUi>
.
|
Aquí tengo una solución para cargar playlist Filename: getpl.sh ` ClientID="" #Generar el codigo de autorizacion base64 ClientID:ClientSecret #Capturar Token token=$(curl -X "POST" -H "Authorization: Basic $basic" -d grant_type=client_credentials https://accounts.spotify.com/api/token) #Capturar Usuario y URI de playlist #echo "https://api.spotify.com/v1/users/"$user"/playlists/"$uri"/tracks?fields=items(track(uri))" echo "Capturando nombre de playlist" echo -e "nombre de playlist:\n" if [ ! -d "V.A.-$nombreplaylist" ]; then #Captura de tracks en un archivo de texto echo -e "Iniciando Rippeo\n" spotify-ripper $nombreplaylist.txt ` |
@DevMiKeCL $ cat spotify-get-tracks.sh
#!/usr/bin/env bash
set -e
set -o errexit
CID=${2}
CS=${3}
auth=$(echo -n "$CID:$CS" | base64 -w 0)
t=$(curl -X "POST" -H "Authorization: Basic $auth" -d grant_type=client_credentials https://accounts.spotify.com/api/token)
token=$(echo "$t" | jq -r '.access_token')
playlisturl="${1}"
user=$(echo $playlisturl | cut -d "/" -f5)
uri=$(echo $playlisturl | cut -d "/" -f7 | cut -d "?" -f1)
t=$(curl "https://api.spotify.com/v1/users/$user/playlists/$uri?fields=name" -H "Authorization: Bearer $token")
playlist=$(echo "$t" | jq -r '.name')
offset=0
while (( $offset < 42000 )); do
t=$(curl "https://api.spotify.com/v1/users/$user/playlists/$uri/tracks?fields=items(track(uri))&offset=$offset" -H "Authorization: Bearer $token" )
tracks=$(echo "$t" | jq -r '.items[] | .track | .uri' )
echo "$tracks"
if [ -z "$tracks" ]; then
break
fi
offset=$[$offset + 100]
done |
@DevMiKeCL , your code also had a bug. It could not download playlists longer than 100 tracks. |
if you prefer a pythonic script take a look at this simple gist |
great, thanks! i will try your code :) |
damn nice |
I couldn't get the #!/bin/sh
trap 'exit' INT
while read track; do
echo "Ripping $track to $2"
spotify-ripper -d $2 $track
done < $1 Open your playlist(s), select all the tracks in them, right click, Share->Copy Spotify URIs, then paste into a file. Do |
I use this for getting the token:
With a JSON file
Then checking for (mandatory) parameters:
And finally getting everything working (after some shellshecks have been done):
ℹ️ |
Playlists seem not able to be ripped. After logging in playlist is loaded and the program immediately stopped without giving an error.
Spotify Ripper - v2.9.1 Encoding output: MP3, VBR 0 Spotify bitrate: 320 kbps Unicode support: Yes Output directory: /media/downloads/spotify Settings directory: /root/.spotify-ripper Format String: {album_artist}/({year}) {album}/{track_num:2} - {track_name}.{ext} Overwrite files: No Logging in... Logged in as 1153815924 Loading playlist... Loading playlist... Logging out...
I think I have seen problems with playlists over at mopidy. Might it be related?
The text was updated successfully, but these errors were encountered: