Merge pull request #31 from Seirdy/fix/https

Use HTTPS to fetch images
This commit is contained in:
Siddharth Dushantha 2020-02-29 09:21:32 +01:00 committed by GitHub
commit dc98871400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

6
kunst
View File

@ -102,10 +102,10 @@ get_cover_online() {
fi fi
# Try to get the album cover online from api.deezer.com # Try to get the album cover online from api.deezer.com
API_URL="http://api.deezer.com/search/autocomplete?q=$(mpc current)" && API_URL=${API_URL//' '/'%20'} API_URL="https://api.deezer.com/search/autocomplete?q=$(mpc current)" && API_URL=${API_URL//' '/'%20'}
# Extract the albumcover from the json returned # Extract the albumcover from the json returned
IMG_URL=$(curl -s "$API_URL" | jq -r '.playlists.data[0] | .picture_big') IMG_URL=$(curl -s --ssl "$API_URL" | jq -r '.playlists.data[0] | .picture_big')
if [ "$IMG_URL" = '' ] || [ "$IMG_URL" = 'null' ];then if [ "$IMG_URL" = '' ] || [ "$IMG_URL" = 'null' ];then
if [ ! $SILENT ];then if [ ! $SILENT ];then
@ -116,7 +116,7 @@ get_cover_online() {
if [ ! $SILENT ];then if [ ! $SILENT ];then
echo "kunst: cover found online" echo "kunst: cover found online"
fi fi
curl -o $COVER -s $IMG_URL curl -o $COVER -s --ssl $IMG_URL
ARTLESS=false ARTLESS=false
fi fi