Skip to content

Commit

Permalink
Preview-tui fix gif whitespace name
Browse files Browse the repository at this point in the history
  • Loading branch information
luukvbaal authored and jarun committed Dec 25, 2021
1 parent ac86fbe commit a3d660b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/preview-tui
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,14 @@ generate_preview() {
epub) gnome-epub-thumbnailer "$3" "$NNN_PREVIEWDIR/$3.jpg" ;;
font) fontpreview -i "$3" -o "$NNN_PREVIEWDIR/$3.jpg" ;;
gif) if [ -p "$FIFO_UEBERZUG" ] && exists convert; then
frameprefix="$NNN_PREVIEWDIR/$3/${3##*/}"
if [ ! -d "$NNN_PREVIEWDIR/$3" ]; then
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
while true; do
for frame in $(find "$NNN_PREVIEWDIR/$3"/*.jpg | sort -V); do
image_preview "$1" "$2" "$frame"
for i in $(seq 0 "$(($(find "$NNN_PREVIEWDIR/$3" | wc -l) - 2))"); do
image_preview "$1" "$2" "$frameprefix-$i.jpg"
sleep 0.1
done
done &
Expand Down

0 comments on commit a3d660b

Please sign in to comment.