Adam Majer
3161170a79
- Update to 4.8.25 * Avoid subshell warning for standalone mcedit/mcview/mcdiffview run from mc * Implement chattr command (change ext{2,3,4}fs extended attributes) * New syntax highlighting: Kotlin and ino * File highlighting updates * Lots of other fixes - Updated mc-ext-audio.patch - Updated mc-extd-sound.patch - Removed mc-rpm.patch OBS-URL: https://build.opensuse.org/request/show/824008 OBS-URL: https://build.opensuse.org/package/show/Base:System/mc?expand=0&rev=133
60 lines
1.6 KiB
Diff
60 lines
1.6 KiB
Diff
--- misc/ext.d/sound.sh.orig 2020-07-05 14:38:53.000000000 -0300
|
|
+++ misc/ext.d/sound.sh 2020-07-24 08:30:33.348037353 -0300
|
|
@@ -6,18 +6,37 @@
|
|
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
|
|
|
|
+ if type -p mediainfo >/dev/null 2>&1 ; then
|
|
+ mediainfo "${MC_EXT_FILENAME}"
|
|
+ return $?
|
|
+ fi
|
|
+
|
|
case "${filetype}" in
|
|
mp3)
|
|
- mpg123 -vtn1 "${MC_EXT_FILENAME}" 2>&1 | \
|
|
- sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
|
|
+ if type -p mpg123 ; then
|
|
+ mpg123 -vtn1 "${MC_EXT_FILENAME}" 2>&1 | \
|
|
+ sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
|
|
+ return 0
|
|
+ fi
|
|
;;
|
|
ogg)
|
|
- ogginfo "${MC_EXT_FILENAME}"
|
|
+ type -p ogginfo && ogginfo "${MC_EXT_FILENAME}" && return 0
|
|
;;
|
|
opus)
|
|
opusinfo "${MC_EXT_FILENAME}"
|
|
@@ -25,11 +44,11 @@
|
|
wma)
|
|
mplayer -quiet -slave -frames 0 -vo null -ao null -identify "${MC_EXT_FILENAME}" 2>/dev/null | \
|
|
tail +13 || file "${MC_EXT_FILENAME}"
|
|
- ;;
|
|
- *)
|
|
- cat "${MC_EXT_FILENAME}"
|
|
+ return $?
|
|
;;
|
|
esac
|
|
+
|
|
+ mplayer -identify -vo null -ao null -frames 0 "${MC_EXT_FILENAME}" 2>&1 | sed -n '/^ID_/p'
|
|
}
|
|
|
|
do_open_action() {
|