alexa_remotectl 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/alexa_remotectl.rb +20 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b2029c701df7521e20261071499fcdd877858b75ef7c6257ada56fa0e83f390
|
4
|
+
data.tar.gz: 2cb5831f0c13db113c7991954940cef62e2a4ad90fd8ee66c50e17a028e3ae8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 282e5aad4855e6a1aa67057d4f71ad786044c3c379ecfce3070c34770b396e5dca16de73d604d6a37b6713e29fbe854c44f0fcdf336276680cbaeab5fc2a91e9
|
7
|
+
data.tar.gz: 8af80f421ff7423c5bd729ea3bd9ef0c4b3f150e35cbb79eb28abfbd3771a223f939d31d904e665a09bf69187c75625e8256e66474182072e3b138327a2aa830
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/alexa_remotectl.rb
CHANGED
@@ -406,6 +406,25 @@ class AlexaDevices
|
|
406
406
|
end
|
407
407
|
end
|
408
408
|
|
409
|
+
def apply_cmd2(a, cmd, id, args)
|
410
|
+
|
411
|
+
if id then
|
412
|
+
|
413
|
+
alexa, _ = a.find {|_, label| label.to_sym == id.to_sym}
|
414
|
+
alexa.method(cmd).call(*args)
|
415
|
+
|
416
|
+
else
|
417
|
+
|
418
|
+
a.map do |alexa, label|
|
419
|
+
|
420
|
+
puts cmd.to_s + ' @' + label.inspect
|
421
|
+
alexa.method(cmd).call(*args)
|
422
|
+
|
423
|
+
end
|
424
|
+
|
425
|
+
end
|
426
|
+
end
|
427
|
+
|
409
428
|
def invoke(cmd, id, *args)
|
410
429
|
apply_cmd(@devices, cmd, id, args)
|
411
430
|
end
|
@@ -413,7 +432,7 @@ class AlexaDevices
|
|
413
432
|
# apply command to an Alexa device which is currently playing
|
414
433
|
#
|
415
434
|
def invoke2(cmd, id, *args)
|
416
|
-
|
435
|
+
apply_cmd2(playing(), cmd, id, args)
|
417
436
|
end
|
418
437
|
|
419
438
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|