mpv-slave 0.1 → 0.2
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.tar.gz.sig +0 -0
- data/.gitignore +1 -0
- data/lib/mpv-slave/mpv.rb +9 -0
- data/mpv-slave.gemspec +3 -3
- data/test.rb +18 -0
- metadata +6 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2be0c1bec3a3db653b0ed40214431dad4350f16
|
4
|
+
data.tar.gz: f0b45a2c3818ed97bc3e8239e41aa476a808dd9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8238479c87d1ad31d0711d56737e9533e0ce502ed9777a3c1fb13c02fdc662a91f44d9bbf56fb38fa76f3f594af72823e84598318fcab3421d58c2fe960a20a
|
7
|
+
data.tar.gz: cf20487cf50d8197ffd232d351f198bcb766be2e77aa08ce9e59cbc52b584d6d5e4ca65dc8fdb8f4f1e11558465411b8eb3542da5a05dbd4e8e3b55a4a004647
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/pkg
|
data/lib/mpv-slave/mpv.rb
CHANGED
@@ -12,6 +12,7 @@ module MPV
|
|
12
12
|
"mpv",
|
13
13
|
"--idle",
|
14
14
|
"--really-quiet",
|
15
|
+
"--no-input-terminal",
|
15
16
|
"--input-unix-socket", socket,
|
16
17
|
)
|
17
18
|
puts "waiting for mpv to start up..."
|
@@ -49,6 +50,10 @@ module MPV
|
|
49
50
|
play file, mode: "append-play", wait: false
|
50
51
|
end
|
51
52
|
|
53
|
+
def pause
|
54
|
+
toggle "pause"
|
55
|
+
end
|
56
|
+
|
52
57
|
def get prop
|
53
58
|
command "get_property", prop
|
54
59
|
end
|
@@ -87,6 +92,10 @@ module MPV
|
|
87
92
|
disable_event "all"
|
88
93
|
end
|
89
94
|
|
95
|
+
def method_missing cmd, *args, &block
|
96
|
+
command cmd.to_s, *args, &block
|
97
|
+
end
|
98
|
+
|
90
99
|
def close
|
91
100
|
Process.kill :SIGTERM, @pid
|
92
101
|
Process.wait @pid
|
data/mpv-slave.gemspec
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "mpv-slave"
|
3
|
-
s.version = "0.
|
3
|
+
s.version = "0.2"
|
4
4
|
|
5
5
|
s.authors = ["muflax"]
|
6
6
|
s.summary = "mpv slave control"
|
7
7
|
s.description = "basic slave control for mpv"
|
8
8
|
s.email = "mail@muflax.com"
|
9
|
-
s.license = "GPL-3"
|
9
|
+
s.license = "GPL-3.0+"
|
10
10
|
s.extra_rdoc_files = [
|
11
11
|
"README"
|
12
12
|
]
|
@@ -14,5 +14,5 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.homepage = "http://github.com/muflax/mpv-slave"
|
15
15
|
s.require_paths = ["lib"]
|
16
16
|
|
17
|
-
s.add_development_dependency "rake"
|
17
|
+
s.add_development_dependency "rake", "~> 0"
|
18
18
|
end
|
data/test.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- encoding: utf-8 -*-
|
3
|
+
# Copyright muflax <mail@muflax.com>, 2016
|
4
|
+
# License: GNU GPLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
|
5
|
+
|
6
|
+
require "./lib/mpv-slave"
|
7
|
+
|
8
|
+
mpv = MPV::Slave.new
|
9
|
+
|
10
|
+
mpv.play "~/local/sounds/crow.mp3"
|
11
|
+
mpv.add "~/local/sounds/crow.mp3"
|
12
|
+
mpv.add "~/local/sounds/crow.mp3"
|
13
|
+
mpv.add "~/local/sounds/crow.mp3"
|
14
|
+
|
15
|
+
p mpv.get "time-pos"
|
16
|
+
|
17
|
+
mpv.wait_for "idle"
|
18
|
+
mpv.close
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mpv-slave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- muflax
|
@@ -34,14 +34,14 @@ dependencies:
|
|
34
34
|
name: rake
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '0'
|
40
40
|
type: :development
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- - "
|
44
|
+
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
description: basic slave control for mpv
|
@@ -51,6 +51,7 @@ extensions: []
|
|
51
51
|
extra_rdoc_files:
|
52
52
|
- README
|
53
53
|
files:
|
54
|
+
- ".gitignore"
|
54
55
|
- Gemfile
|
55
56
|
- LICENSE
|
56
57
|
- README
|
@@ -59,9 +60,10 @@ files:
|
|
59
60
|
- lib/mpv-slave/mpv.rb
|
60
61
|
- lib/mpv-slave/socket.rb
|
61
62
|
- mpv-slave.gemspec
|
63
|
+
- test.rb
|
62
64
|
homepage: http://github.com/muflax/mpv-slave
|
63
65
|
licenses:
|
64
|
-
- GPL-3
|
66
|
+
- GPL-3.0+
|
65
67
|
metadata: {}
|
66
68
|
post_install_message:
|
67
69
|
rdoc_options: []
|
metadata.gz.sig
CHANGED
Binary file
|