sdushantha/kunst

Download album art if a file does not have it

Closed this issue · 8 comments

I have come up with and idea to make kunst much better!

If the current song does not have en embedded album art AND there is an internet connection, download the album art from the internet using the Deezer API. If there is NO internet connection, THEN use the music note as the album art.

How would be get the album art?
Use the Deezer API.
We would use mpc current to get the current music and use the output of that to put in the API and fetch the JSON data from Deezer.

Example:

http://api.deezer.com/search/autocomplete?q=Brian Crain - Song for Sienna

Then we would use jq to parse the JSON data and fetch the first url to the album art image (the one which is 500x500). If there is no result returned, (maybe the current song does not exist on Deezer), then we would just show the music note.

@mateossh
Would be nice if you could help me with this.

@sdushantha Do you mind if i write a simple python script that would download the image?

@deepjyoti30 I think the whole point of this project is to just use bash

@sdushantha sure, I'll think about it in a free time

@deepjyoti30 Like @mateossh mentioned, the point of this project is to just use bash. But you are more than welcome to help out of you want to write some bash 😁

@mateossh thank you!

fixed in #8

@deepjyoti30 I think the problem that we had earlier, is still happening. I checked through the code and I cant see where the error is

@sdushantha I'm not facing any issues at all. Sometimes it stops displaying the next picture but i don't think its an issues of kunst.
I tried with all combinations and it was working all right. Can you give me exact steps to reproduce it?

@deepjyoti30 You are right, it is not a problem with kunst. I might be a problem with sxiv. In the future, I think I will allow users to choose a image viewer (eg. sxiv, feh, viewnior)