浏览代码

Detect if MOC is playing

master
Arun Prakash Jana 5 年前
父节点
当前提交
8fff4643f5
找不到此签名对应的密钥 GPG 密钥 ID: A75979F35C080412
共有 1 个文件被更改,包括 17 次插入7 次删除
  1. +17
    -7
      plugins/mocplay

+ 17
- 7
plugins/mocplay 查看文件

@@ -59,15 +59,25 @@ fi
if [ -z "$ret" ]; then if [ -z "$ret" ]; then
# mocp not running # mocp not running
mocp -S mocp -S

# clear selection and play
mocp -c
mocp_add "$1"
mocp -p
else else
# mocp running, just append # mocp running, check if it's playing
mocp_add "$1" state=$(mocp -i | grep "State:" | cut -d' ' -f2)

if [ $state = 'PLAY' ]; then
# add to playlist and exit
mocp_add "$1"

# uncomment the line below to show mocp interface after appending
# mocp

exit
fi
fi fi


# clear selection and play
mocp -c
mocp_add "$1"
mocp -p

# uncomment the line below to show mocp interface after appending # uncomment the line below to show mocp interface after appending
# mocp # mocp

||||||
x
 
000:0
正在加载...
取消
保存