Adam Majer
f1b234770f
archives (bsc#1233006). OBS-URL: https://build.opensuse.org/package/show/Base:System/mc?expand=0&rev=164
37 lines
994 B
Diff
37 lines
994 B
Diff
---
|
|
misc/ext.d/video.sh | 17 +++++++++++++++--
|
|
1 file changed, 15 insertions(+), 2 deletions(-)
|
|
|
|
--- a/misc/ext.d/video.sh
|
|
+++ b/misc/ext.d/video.sh
|
|
@@ -6,14 +6,27 @@
|
|
action=$1
|
|
filetype=$2
|
|
|
|
-[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open"
|
|
+[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="_xdg_open"
|
|
+
|
|
+_xdg_open()
|
|
+{
|
|
+ if [ -n "$DISPLAY" ] && type -p gmplayer ; then
|
|
+ gmplayer "${MC_EXT_FILENAME}"
|
|
+ elif type -p mplayer ; then
|
|
+ mplayer "${MC_EXT_FILENAME}"
|
|
+ else
|
|
+ xdg-open "${MC_EXT_FILENAME}"
|
|
+ fi
|
|
+}
|
|
|
|
do_view_action() {
|
|
filetype=$1
|
|
|
|
case "${filetype}" in
|
|
*)
|
|
- if which mplayer >/dev/null 2>&1; then
|
|
+ if type -p mediainfo >/dev/null 2>&1 ; then
|
|
+ mediainfo "${MC_EXT_FILENAME}"
|
|
+ elif which 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
|