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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c10601f957647c6d6198a467710a39fc7b4401c
4
- data.tar.gz: 1d6324c2ef7c1df3e5befc678cda7a8d3c2fb2b5
3
+ metadata.gz: c2be0c1bec3a3db653b0ed40214431dad4350f16
4
+ data.tar.gz: f0b45a2c3818ed97bc3e8239e41aa476a808dd9a
5
5
  SHA512:
6
- metadata.gz: f7a13f0bbf8fcf1bc9ec8d258c382e90f7c21cf1739523a6b440f6627263d7a253077ae6c4702ebe478fccf392a4927f4d6b58804713f87ae70ade598d3f1596
7
- data.tar.gz: b1a5d739984b5119e1cd1674506682631aa88e9881ba91bdb1345db5226f326e36e5670eda423d4cb0a8b6cdedce95efd2a08c8d6c0bb90f0e97c134c842faab
6
+ metadata.gz: f8238479c87d1ad31d0711d56737e9533e0ce502ed9777a3c1fb13c02fdc662a91f44d9bbf56fb38fa76f3f594af72823e84598318fcab3421d58c2fe960a20a
7
+ data.tar.gz: cf20487cf50d8197ffd232d351f198bcb766be2e77aa08ce9e59cbc52b584d6d5e4ca65dc8fdb8f4f1e11558465411b8eb3542da5a05dbd4e8e3b55a4a004647
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1 @@
1
+ /pkg
@@ -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
@@ -1,12 +1,12 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "mpv-slave"
3
- s.version = "0.1"
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.1'
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