Skip to content

Commit

Permalink
Update mocplay to understand opener calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jarun committed Feb 23, 2020
1 parent 78372b2 commit d442346
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion plugins/mocplay
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugins/mp3conv
Original file line number Diff line number Diff line change
Expand Up @@ -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"
;;
*)
;;
Expand Down
4 changes: 2 additions & 2 deletions plugins/nuke
Original file line number Diff line number Diff line change
Expand Up @@ -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 &
Expand Down

0 comments on commit d442346

Please sign in to comment.