summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-08-07 18:17:54 +0200
committerhut <hut@lavabit.com>2012-08-07 18:17:54 +0200
commit14412eea0cd7ec556062f8f984dc5577ebdc8b30 (patch)
tree25bbd595364921783c127d9f6e99e9af6dbbdd6e
parent91f4dcabd2bd6b83afae5d58928cc8e1353286ef (diff)
downloadranger-14412eea0cd7ec556062f8f984dc5577ebdc8b30.tar.gz
config/rifle.conf: Fix handling of mkv files
https://github.com/hut/ranger/issues/44#issuecomment-7558251

adam8157:
 have 10 mkv files, four of them are "application/octet-stream"(and file
 without options returns "EBML file, creator matroska"), others are
 "video/x-matroska".
-rw-r--r--ranger/config/rifle.conf13
1 files changed, 13 insertions, 0 deletions
diff --git a/ranger/config/rifle.conf b/ranger/config/rifle.conf
index daed8b90..bb876310 100644
--- a/ranger/config/rifle.conf
+++ b/ranger/config/rifle.conf
@@ -116,11 +116,24 @@ mime ^video|audio, has vlc,      X, flag f = vlc -- "$@"
 mime ^video|audio, has totem,    X, flag f = totem -- "$@"
 mime ^video|audio, has totem,    X, flag f = totem --fullscreen -- "$@"
 
+# MKV videos are sometimes not recognized as video/x-matroska
+!mime ^video|audio, ext mkv, has gmplayer, X, flag f = gmplayer -- "$@"
+!mime ^video|audio, ext mkv, has smplayer, X, flag f = smplayer "$@"
+!mime ^video,       ext mkv, has mplayer2, X, flag f = mplayer2 -- "$@"
+!mime ^video,       ext mkv, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
+!mime ^video,       ext mkv, has mplayer,  X, flag f = mplayer -- "$@"
+!mime ^video,       ext mkv, has mplayer,  X, flag f = mplayer -fs -- "$@"
+!mime ^video|audio, ext mkv, has vlc,      X, flag f = vlc -- "$@"
+!mime ^video|audio, ext mkv, has totem,    X, flag f = totem -- "$@"
+!mime ^video|audio, ext mkv, has totem,    X, flag f = totem --fullscreen -- "$@"
+
 #--------------------------------------------
 # Video without X:
 #-------------------------------------------
 mime ^video, terminal, !X, has mplayer2  = mplayer2 -- "$@"
 mime ^video, terminal, !X, has mplayer   = mplayer -- "$@"
+!mime ^video, ext mkv, terminal, !X, has mplayer2  = mplayer2 -- "$@"
+!mime ^video, ext mkv, terminal, !X, has mplayer   = mplayer -- "$@"
 
 #-------------------------------------------
 # Image Viewing: