anyplayer 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- anyplayer (0.0.4)
4
+ anyplayer (1.0.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/README.md CHANGED
@@ -4,8 +4,8 @@ Anyplayer
4
4
  [![Gem Version](https://badge.fury.io/rb/anyplayer.png)](http://badge.fury.io/rb/anyplayer)
5
5
  [![Build Status](https://travis-ci.org/sunny/anyplayer.png)](https://travis-ci.org/sunny/anyplayer)
6
6
 
7
- Interacts with the currently running music player. Supports iTunes Mac, iTunes Windows, MPD,
8
- Rythmbox, Spotify Mac and XMMS2.
7
+ Interacts with the currently running music player.
8
+ Supports iTunes Mac, iTunes Windows, Spotify Mac, MPD, Rhythmbox, Amarok and XMMS2.
9
9
 
10
10
  Install
11
11
  -------
data/anyplayer.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.email = ["sunny@sunfox.org", "gordon@gordondiggs.com"]
11
11
  s.homepage = "http://github.com/sunny/anyplayer"
12
12
  s.summary = %q{Interact with the running music player}
13
- s.description = %q{Play/pause/skip songs in iTunes, Rythmbox, MPD, XMMS}
13
+ s.description = %q{Play/pause/skip songs in iTunes Mac, iTunes Windows, Spotify Mac, MPD, Rhythmbox, Amarok and XMMS2}
14
14
 
15
15
  s.files = `git ls-files`.split("\n")
16
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -45,6 +45,11 @@ class Anyplayer::ItunesMac < Anyplayer::Player
45
45
  itunes 'return album of current track'
46
46
  end
47
47
 
48
+ def playing?
49
+ playing = itunes 'return player state is playing'
50
+ playing == "true"
51
+ end
52
+
48
53
  def launched?
49
54
  nb = %x(osascript -e 'tell app "System Events" to count (every process whose name is "iTunes")' 2>/dev/null).rstrip
50
55
  nb.match(/^\d+/) and nb.to_i > 0 ? true : false
@@ -45,6 +45,11 @@ class Anyplayer::SpotifyMac < Anyplayer::Player
45
45
  spotify 'return album of current track'
46
46
  end
47
47
 
48
+ def playing?
49
+ playing = spotify 'return player state is playing'
50
+ playing == "true"
51
+ end
52
+
48
53
  def launched?
49
54
  nb = %x(osascript -e 'tell app "System Events" to count (every process whose name is "Spotify")' 2>/dev/null).rstrip
50
55
  nb.match(/^\d+/) and nb.to_i > 0 ? true : false
@@ -1,3 +1,3 @@
1
1
  module Anyplayer
2
- VERSION = "0.0.4"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anyplayer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-15 00:00:00.000000000 Z
13
+ date: 2013-06-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -44,7 +44,8 @@ dependencies:
44
44
  - - ! '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
- description: Play/pause/skip songs in iTunes, Rythmbox, MPD, XMMS
47
+ description: Play/pause/skip songs in iTunes Mac, iTunes Windows, Spotify Mac, MPD,
48
+ Rhythmbox, Amarok and XMMS2
48
49
  email:
49
50
  - sunny@sunfox.org
50
51
  - gordon@gordondiggs.com
@@ -92,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
93
  version: '0'
93
94
  segments:
94
95
  - 0
95
- hash: 1339688103094380844
96
+ hash: 4456173292924984884
96
97
  required_rubygems_version: !ruby/object:Gem::Requirement
97
98
  none: false
98
99
  requirements:
@@ -101,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
102
  version: '0'
102
103
  segments:
103
104
  - 0
104
- hash: 1339688103094380844
105
+ hash: 4456173292924984884
105
106
  requirements: []
106
107
  rubyforge_project:
107
108
  rubygems_version: 1.8.23