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 <yury.zaytsev@moneymeets.com>
This commit is contained in:
Artem S. Tashkinov 2018-06-02 12:16:41 +00:00 committed by Yury V. Zaytsev
parent c9fb0c33e3
commit 0075f36b69

View File

@ -13,8 +13,14 @@ do_view_action() {
case "${filetype}" in case "${filetype}" in
*) *)
mplayer -identify -vo null -ao null -frames 0 "${MC_EXT_FILENAME}" 2>&1 | \ if mplayer >/dev/null 2>&1; then
sed -n 's/^ID_//p' 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 esac
} }