anyplayer 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/anyplayer.gemspec +1 -1
- data/lib/anyplayer.rb +1 -0
- data/lib/anyplayer/players/rdio_mac.rb +66 -0
- data/lib/anyplayer/version.rb +1 -1
- metadata +7 -6
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Anyplayer
|
|
5
5
|
[](https://travis-ci.org/sunny/anyplayer)
|
6
6
|
|
7
7
|
Interacts with the currently running music player.
|
8
|
-
Supports iTunes Mac, iTunes Windows, Spotify Mac, MPD, Rhythmbox, Amarok and XMMS2.
|
8
|
+
Supports iTunes Mac, iTunes Windows, Spotify Mac, Rdio 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 Mac, iTunes Windows, Spotify Mac, MPD, Rhythmbox, Amarok and XMMS2}
|
13
|
+
s.description = %q{Play/pause/skip songs in iTunes Mac, iTunes Windows, Spotify Mac, Rdio 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")
|
data/lib/anyplayer.rb
CHANGED
@@ -0,0 +1,66 @@
|
|
1
|
+
class Anyplayer::RdioMac < Anyplayer::Player
|
2
|
+
def play
|
3
|
+
rdio 'play'
|
4
|
+
end
|
5
|
+
|
6
|
+
def pause
|
7
|
+
rdio 'pause'
|
8
|
+
end
|
9
|
+
|
10
|
+
def playpause
|
11
|
+
rdio 'playpause'
|
12
|
+
end
|
13
|
+
|
14
|
+
def prev
|
15
|
+
rdio 'previous track'
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
19
|
+
def next
|
20
|
+
rdio 'next track'
|
21
|
+
super
|
22
|
+
end
|
23
|
+
|
24
|
+
def voldown
|
25
|
+
rdio 'set sound volume to sound volume - 10'
|
26
|
+
end
|
27
|
+
|
28
|
+
def volup
|
29
|
+
rdio 'set sound volume to sound volume + 10'
|
30
|
+
end
|
31
|
+
|
32
|
+
def volume
|
33
|
+
rdio 'return sound volume'
|
34
|
+
end
|
35
|
+
|
36
|
+
def track
|
37
|
+
rdio 'return name of current track'
|
38
|
+
end
|
39
|
+
|
40
|
+
def artist
|
41
|
+
rdio 'return artist of current track'
|
42
|
+
end
|
43
|
+
|
44
|
+
def album
|
45
|
+
rdio 'return album of current track'
|
46
|
+
end
|
47
|
+
|
48
|
+
def playing?
|
49
|
+
playing = rdio 'return player state is playing'
|
50
|
+
playing == "true"
|
51
|
+
end
|
52
|
+
|
53
|
+
def launched?
|
54
|
+
nb = %x(osascript -e 'tell app "System Events" to count (every process whose name is "rdio")' 2>/dev/null).rstrip
|
55
|
+
nb.match(/^\d+/) and nb.to_i > 0 ? true : false
|
56
|
+
end
|
57
|
+
|
58
|
+
def name
|
59
|
+
"Rdio Mac"
|
60
|
+
end
|
61
|
+
|
62
|
+
private
|
63
|
+
def rdio(command)
|
64
|
+
%x(osascript -e 'tell app "rdio" to #{command}').rstrip
|
65
|
+
end
|
66
|
+
end
|
data/lib/anyplayer/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.1.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-
|
13
|
+
date: 2013-10-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|
@@ -44,8 +44,8 @@ dependencies:
|
|
44
44
|
- - ! '>='
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
|
-
description: Play/pause/skip songs in iTunes Mac, iTunes Windows, Spotify Mac,
|
48
|
-
Rhythmbox, Amarok and XMMS2
|
47
|
+
description: Play/pause/skip songs in iTunes Mac, iTunes Windows, Spotify Mac, Rdio
|
48
|
+
Mac, MPD, Rhythmbox, Amarok and XMMS2
|
49
49
|
email:
|
50
50
|
- sunny@sunfox.org
|
51
51
|
- gordon@gordondiggs.com
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/anyplayer/players/itunes_windows.rb
|
71
71
|
- lib/anyplayer/players/mpd.rb
|
72
72
|
- lib/anyplayer/players/noplayer.rb
|
73
|
+
- lib/anyplayer/players/rdio_mac.rb
|
73
74
|
- lib/anyplayer/players/rhythmbox.rb
|
74
75
|
- lib/anyplayer/players/spotify_mac.rb
|
75
76
|
- lib/anyplayer/players/xmms2.rb
|
@@ -93,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
94
|
version: '0'
|
94
95
|
segments:
|
95
96
|
- 0
|
96
|
-
hash:
|
97
|
+
hash: -2566882971026617068
|
97
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
99
|
none: false
|
99
100
|
requirements:
|
@@ -102,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
103
|
version: '0'
|
103
104
|
segments:
|
104
105
|
- 0
|
105
|
-
hash:
|
106
|
+
hash: -2566882971026617068
|
106
107
|
requirements: []
|
107
108
|
rubyforge_project:
|
108
109
|
rubygems_version: 1.8.23
|