aboutsummaryrefslogtreecommitdiffhomepage
path: root/mpd/ncmpcpp/cover_obs.sh
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-11-07 11:32:27 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-11-07 11:32:27 +0800
commit71ca28742ac4f93ab2401eaee8e78471c023cd4b (patch)
treedd7c3921d249151dc3179f015153b9f9833d9d73 /mpd/ncmpcpp/cover_obs.sh
parentc7ed81e664a592db8fc9a9a6e8f44843de8024a1 (diff)
Update
Diffstat (limited to 'mpd/ncmpcpp/cover_obs.sh')
-rwxr-xr-xmpd/ncmpcpp/cover_obs.sh21
1 files changed, 0 insertions, 21 deletions
diff --git a/mpd/ncmpcpp/cover_obs.sh b/mpd/ncmpcpp/cover_obs.sh
deleted file mode 100755
index 032bd08..0000000
--- a/mpd/ncmpcpp/cover_obs.sh
+++ /dev/null
@@ -1,21 +0,0 @@
1#!/bin/bash
2
3COVER="/tmp/album_cover.png"
4COVER_SIZE="400"
5
6#path to current song
7file="$MUSIC_DIR/$(mpc --format %file% current)"
8album="${file%/*}"
9#search for cover image
10#use embedded image if present, otherwise take it from the current folder
11err=$(ffmpeg -loglevel 16 -y -i "$file" -an -vcodec copy $EMB_COVER 2>&1)
12if [ "$err" != "" ]; then
13 art=$(find "$album" -maxdepth 1 | grep -m 1 ".*\.\(jpg\|png\|gif\|bmp\)")
14else
15 art=$EMB_COVER
16fi
17if [ "$art" = "" ]; then
18 art="$HOME/.ncmpcpp/default_cover.png"
19fi
20#copy and resize image to destination
21ffmpeg -loglevel 0 -y -i "$art" -vf "scale=$COVER_SIZE:-1" "$COVER" \ No newline at end of file