diff --git a/PKGBUILD b/PKGBUILD index 5f5e149..f692600 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,7 +8,7 @@ pkgdesc="kunst is a deamon that extracts the album art from the songs playing in arch=('any') url="https://github.com/sdushantha/kunst" license=('MIT') -depends=('sxiv' 'imagemagick' 'bash' 'ffmpeg' 'mpc') +depends=('sxiv' 'bash' 'ffmpeg' 'mpc') makedepends=('git') provides=($_pkgname) source=("git+https://github.com/networkpanic/kunst.git") diff --git a/README.md b/README.md index d378feb..b632bef 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ ## Dependencies - ```sxiv``` or ```imv``` -- ```imagemagick``` - ```bash``` - ```ffmpeg``` - ```mpc``` diff --git a/kunst b/kunst index 292b090..8fa3186 100755 --- a/kunst +++ b/kunst @@ -4,7 +4,7 @@ # ┴ ┴└─┘┘└┘└─┘ ┴ # Created by Siddharth Dushantha # -# Dependencies: sxiv or imv, imagemagick, bash, ffmpeg, mpc, jq, mpd +# Dependencies: sxiv or imv, bash, ffmpeg, mpc, jq, mpd VERSION=1.2.4 @@ -139,7 +139,7 @@ get_cover_online() { update_cover() { # Extract the album art from the mp3 file and dont show the messsy # output of ffmpeg - ffmpeg -i "$MUSIC_DIR$(mpc current -f %file%)" $COVER -y &> /dev/null + ffmpeg -loglevel error -i "$MUSIC_DIR/$(mpc current -f %file%)" $COVER -y # Get the status of the previous command STATUS=$? @@ -166,9 +166,8 @@ update_cover() { while read -r CANDIDATE; do if [ -f "$CANDIDATE" ]; then STATUS=0 - export ARTLESS=false - convert "$CANDIDATE" $COVER - ls -l $COVER + ARTLESS=false + ffmpeg -loglevel error -i "$CANDIDATE" -vframes 1 $COVER -y if [ ! $SILENT ];then echo "kunst: found cover $CANDIDATE" fi @@ -186,7 +185,7 @@ update_cover() { # Resize the image to 250x250 if [ $ARTLESS == false ]; then - convert $COVER -resize $SIZE $COVER &> /dev/null + ffmpeg -loglevel error -i $COVER -vframes 1 -vf scale=$WIDTH:-1 $COVER -y if [ ! $SILENT ];then echo "kunst: resized album art to $SIZE" fi