Browse Source

Update mocplay to understand opener calls

master
Arun Prakash Jana 4 years ago
parent
commit
d442346755
No known key found for this signature in database GPG Key ID: A75979F35C080412
3 changed files with 6 additions and 4 deletions
  1. +3
    -1
      plugins/mocplay
  2. +1
    -1
      plugins/mp3conv
  3. +2
    -2
      plugins/nuke

+ 3
- 1
plugins/mocplay View File

@@ -57,7 +57,9 @@ if [ ! -s "$selection" ] && [ -z "$1" ]; then
exit
fi

if [ -s "$selection" ]; then
if [ "$2" = "opener" ]; then
:
elif [ -s "$selection" ]; then
printf "Work with selection? Enter 'y' to confirm: "
read -r resp
fi


+ 1
- 1
plugins/mp3conv View File

@@ -15,7 +15,7 @@ handle_multimedia() {

case "${mime}" in
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"
;;
*)
;;


+ 2
- 2
plugins/nuke View File

@@ -99,8 +99,8 @@ handle_pdf() {
}

handle_audio() {
if which mocp >/dev/null 2>&1; then
mocplay "${FPATH}" >/dev/null 2>&1
if which mocplay >/dev/null 2>&1; then
mocplay "${FPATH}" "opener" >/dev/null 2>&1
exit 0
elif which mpv >/dev/null 2>&1; then
mpv "${FPATH}" >/dev/null 2>&1 &


Loading…
Cancel
Save