mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Update mocplay to understand opener calls
This commit is contained in:
parent
78372b203a
commit
d442346755
|
@ -57,7 +57,9 @@ if [ ! -s "$selection" ] && [ -z "$1" ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -s "$selection" ]; then
|
if [ "$2" = "opener" ]; then
|
||||||
|
:
|
||||||
|
elif [ -s "$selection" ]; then
|
||||||
printf "Work with selection? Enter 'y' to confirm: "
|
printf "Work with selection? Enter 'y' to confirm: "
|
||||||
read -r resp
|
read -r resp
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -15,7 +15,7 @@ handle_multimedia() {
|
||||||
|
|
||||||
case "${mime}" in
|
case "${mime}" in
|
||||||
audio/* | video/*)
|
audio/* | video/*)
|
||||||
ffmpeg -i "${file}" -vn -codec:a libmp3lame -q:a 2 "${outdir}"/"${file%.*}.mp3"
|
ffmpeg -i "${file}" -vn -codec:a libmp3lame -q:a 2 "${outdir}/${file%.*}.mp3"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -99,8 +99,8 @@ handle_pdf() {
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_audio() {
|
handle_audio() {
|
||||||
if which mocp >/dev/null 2>&1; then
|
if which mocplay >/dev/null 2>&1; then
|
||||||
mocplay "${FPATH}" >/dev/null 2>&1
|
mocplay "${FPATH}" "opener" >/dev/null 2>&1
|
||||||
exit 0
|
exit 0
|
||||||
elif which mpv >/dev/null 2>&1; then
|
elif which mpv >/dev/null 2>&1; then
|
||||||
mpv "${FPATH}" >/dev/null 2>&1 &
|
mpv "${FPATH}" >/dev/null 2>&1 &
|
||||||
|
|
Loading…
Reference in a new issue