mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
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:
parent
c9fb0c33e3
commit
0075f36b69
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user