Preview-tui fix gif whitespace name

This commit is contained in:
Luuk van Baal 2021-12-18 22:34:24 +01:00 committed by Arun Prakash Jana
parent ac86fbed0f
commit a3d660b673
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -339,13 +339,14 @@ generate_preview() {
epub) gnome-epub-thumbnailer "$3" "$NNN_PREVIEWDIR/$3.jpg" ;; epub) gnome-epub-thumbnailer "$3" "$NNN_PREVIEWDIR/$3.jpg" ;;
font) fontpreview -i "$3" -o "$NNN_PREVIEWDIR/$3.jpg" ;; font) fontpreview -i "$3" -o "$NNN_PREVIEWDIR/$3.jpg" ;;
gif) if [ -p "$FIFO_UEBERZUG" ] && exists convert; then gif) if [ -p "$FIFO_UEBERZUG" ] && exists convert; then
frameprefix="$NNN_PREVIEWDIR/$3/${3##*/}"
if [ ! -d "$NNN_PREVIEWDIR/$3" ]; then if [ ! -d "$NNN_PREVIEWDIR/$3" ]; then
mkdir -p "$NNN_PREVIEWDIR/$3" mkdir -p "$NNN_PREVIEWDIR/$3"
convert -coalesce -resize "$NNN_PREVIEWWIDTH"x"$NNN_PREVIEWHEIGHT"\> "$3" "$NNN_PREVIEWDIR/$3/${3##*/}.jpg" convert -coalesce -resize "$NNN_PREVIEWWIDTH"x"$NNN_PREVIEWHEIGHT"\> "$3" "$frameprefix.jpg"
fi fi
while true; do while true; do
for frame in $(find "$NNN_PREVIEWDIR/$3"/*.jpg | sort -V); do for i in $(seq 0 "$(($(find "$NNN_PREVIEWDIR/$3" | wc -l) - 2))"); do
image_preview "$1" "$2" "$frame" image_preview "$1" "$2" "$frameprefix-$i.jpg"
sleep 0.1 sleep 0.1
done done
done & done &