From 0075f36b693109a34f8729d47fdf931b0481a68e Mon Sep 17 00:00:00 2001 From: "Artem S. Tashkinov" Date: Sat, 2 Jun 2018 12:16:41 +0000 Subject: [PATCH] Ticket #3919: use MPV as a fallback for mplayer -identify mplayer is not currently actively developed and some people have long switched to MPV - use it as a fallback for "mplayer -identify" command. Also, give the user a hint about mplayer/mpv in case none of them is installed. Signed-off-by: Yury V. Zaytsev --- misc/ext.d/video.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/misc/ext.d/video.sh b/misc/ext.d/video.sh index ff038c832..92700e33e 100755 --- a/misc/ext.d/video.sh +++ b/misc/ext.d/video.sh @@ -13,8 +13,14 @@ do_view_action() { case "${filetype}" in *) - mplayer -identify -vo null -ao null -frames 0 "${MC_EXT_FILENAME}" 2>&1 | \ - sed -n 's/^ID_//p' + if mplayer >/dev/null 2>&1; then + mplayer -identify -vo null -ao null -frames 0 "${MC_EXT_FILENAME}" 2>&1 | \ + sed -n 's/^ID_//p' + elif which mpv_identify.sh >/dev/null 2>&1; then + mpv_identify.sh "${MC_EXT_FILENAME}" + else + echo "Please install either mplayer or mpv to get information for this file" + fi ;; esac }