Fixed the Endpoint
This commit is contained in:
parent
f1fbfbb709
commit
9d4ad785b2
6
kunst
6
kunst
|
@ -7,7 +7,7 @@
|
||||||
# Dependencies: sxiv, imagemagick, bash, ffmpeg, mpc, jq, mpd
|
# Dependencies: sxiv, imagemagick, bash, ffmpeg, mpc, jq, mpd
|
||||||
|
|
||||||
|
|
||||||
VERSION=1.3.2
|
VERSION=1.3.4
|
||||||
COVER=/tmp/kunst.jpg
|
COVER=/tmp/kunst.jpg
|
||||||
MUSIC_DIR=~/Music
|
MUSIC_DIR=~/Music
|
||||||
SIZE=250x250
|
SIZE=250x250
|
||||||
|
@ -112,9 +112,9 @@ get_cover_online() {
|
||||||
|
|
||||||
# Try to get the album cover online from api.deezer.com
|
# Try to get the album cover online from api.deezer.com
|
||||||
API_URL="https://api.deezer.com/search/autocomplete?q=$QUERY" && API_URL=${API_URL//' '/'%20'}
|
API_URL="https://api.deezer.com/search/autocomplete?q=$QUERY" && API_URL=${API_URL//' '/'%20'}
|
||||||
|
echo $API_URL
|
||||||
# Extract the albumcover from the json returned
|
# Extract the albumcover from the json returned
|
||||||
IMG_URL=$(curl -s "$API_URL" | jq -r '.tracks.data[0].album.cover_big')
|
IMG_URL=$(curl -s "$API_URL" | jq -r '.playlists.data[0].picture_big')
|
||||||
|
|
||||||
if [ "$IMG_URL" = '' ] || [ "$IMG_URL" = 'null' ];then
|
if [ "$IMG_URL" = '' ] || [ "$IMG_URL" = 'null' ];then
|
||||||
[ ! "$SILENT" ] && echo "error: cover not found online"
|
[ ! "$SILENT" ] && echo "error: cover not found online"
|
||||||
|
|
Loading…
Reference in New Issue