cmus-bt 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/cmus-bt/player.rb +3 -5
- data/lib/cmus-bt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4cca389c525bbd1b48c2c032407408efe22f704c3aed63aed98857f89c7155d
|
4
|
+
data.tar.gz: a7469f5a057bddb82cbee293d4087943e148f51232cfb658b6d3b95ecdd6ecc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2784af7ea935d6bb919262fc0e7b2d519138527324eb7157e1eac747bb910bb6a10c67f454bf9d610fd22111881afa69bcd4a28d3aa4e4a90af2bbc94e0c8424
|
7
|
+
data.tar.gz: e0265e0991cfa0a04e56bd019ac88612a3942aab7ed8a50f92dc5420e157c048a378f0bc942d6c8cc4713f45bc821a86f31e728eb4682851137073b36cec4f61
|
data/README.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# cmus-bt
|
2
2
|
Bluetooth AVRCP wrapper for [cmus](https://cmus.github.io/).
|
3
3
|
|
4
|
+
This is a wrapper script for manipulating an audio player "cmus" using any AVRCP-supported Bluetooth device. This script requires an environment that bluez running on the Linux. and devices used as remote controller must be paired and connected in advance.
|
5
|
+
|
4
6
|
## Usage
|
5
7
|
```
|
6
|
-
cmus-bt [options] {NAME|DEVICE-ADDRESS}
|
8
|
+
cmus-bt [options] {DEVICE-NAME|DEVICE-ADDRESS}
|
7
9
|
|
8
10
|
options:
|
9
11
|
-l, --list-available-device
|
@@ -17,6 +19,11 @@ options:
|
|
17
19
|
<dd>show available device list</dd>
|
18
20
|
</dl>
|
19
21
|
|
22
|
+
### argument
|
23
|
+
<dl>
|
24
|
+
<dt>DEVICE-NAME or DEVICE-ADDRESS</dt>
|
25
|
+
<dd>Specify the name or address of the device to use as the remote controler. The list of possible devices can be viewed with the -l option.</dd>
|
26
|
+
</dl>
|
20
27
|
|
21
28
|
## Contributing
|
22
29
|
Bug reports and pull requests are welcome on GitHub at https://github.com/kwgt/cmus-bt.
|
data/lib/cmus-bt/player.rb
CHANGED
@@ -38,7 +38,7 @@ module CMusBt
|
|
38
38
|
|
39
39
|
def status
|
40
40
|
ret = catch { |tag|
|
41
|
-
query.each_line {|l| throw tag, $1.to_sym if /^status
|
41
|
+
query.each_line {|l| throw tag, $1.to_sym if /^status (.+)/ =~ l}
|
42
42
|
}
|
43
43
|
|
44
44
|
return ret
|
@@ -102,14 +102,12 @@ module CMusBt
|
|
102
102
|
size = [0, 0, 0, 0, 0].pack(EVENT_STRUCTURE).bytesize
|
103
103
|
|
104
104
|
until io.eof?
|
105
|
-
|
106
|
-
tmp = raw.unpack(EVENT_STRUCTURE)
|
107
|
-
|
105
|
+
tmp = io.read(size).unpack(EVENT_STRUCTURE)
|
108
106
|
type = tmp[2]
|
109
107
|
code = tmp[3]
|
110
108
|
val = tmp[4]
|
111
109
|
|
112
|
-
$logger.debug("
|
110
|
+
$logger.debug("input #{type}, #{code}, #{val}")
|
113
111
|
|
114
112
|
next if type != 1 or val != 0
|
115
113
|
|
data/lib/cmus-bt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmus-bt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hirosho Kuwagata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|