]> git.draconx.ca Git - mpdhacks.git/blobdiff - mpdthumb.sh
mpdthumb: Fix failure when readpicture/albumart both return data.
[mpdhacks.git] / mpdthumb.sh
index 4faf7a61f7351e2ef9731e2d57aff9851789996a..e87f8370f72ab0f8673e4b21edc42218c7d61ff3 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright © 2019-2021 Nick Bowler
+# Copyright © 2019-2022 Nick Bowler
 #
 # Generate thumbnails for cover art retrieved from MPD.
 #
@@ -204,6 +204,10 @@ while read a b <&6; do
     prevn=$# file=$1 mode=$a; shift || exit; continue
     ;;
   size:)
+    if test x"$mode/$valid" = x"albumart/readpicture$prevn"; then
+      # readpicture result was OK, skip over albumart result
+      continue
+    fi
     valid=$mode$#
     ;;
   ACK)