mirror of
https://github.com/jarun/nnn.git
synced 2024-11-27 21:31:30 +00:00
preview-tui-ext ffmpegthumbnailer fallback (#906)
This commit is contained in:
parent
bc59961d98
commit
73a54e7550
|
@ -252,7 +252,11 @@ generate_preview() {
|
|||
filename="$(echo "${3##*/}" | cut -d. -f1)"
|
||||
mv "$TMPDIR/${3%/*}/$filename.jpg" "$TMPDIR/$3.jpg" ;;
|
||||
pdf) pdftoppm -jpeg -f 1 -singlefile "$3" "$TMPDIR/$3" >/dev/null 2>&1 ;;
|
||||
video) ffmpegthumbnailer -i "$3" -o "$TMPDIR/$3.jpg" -s 0 -q 10 >/dev/null 2>&1 ;;
|
||||
video) if ! ffmpegthumbnailer -i "$3" -o "$TMPDIR/$3.jpg" -s 0 -q 10 >/dev/null 2>&1; then
|
||||
rm "$TMPDIR/$3.jpg"
|
||||
fifo_pager print_bin_info "$3"
|
||||
return
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
if [ -f "$TMPDIR/$3.jpg" ]; then
|
||||
|
|
Loading…
Reference in a new issue