spotify-dbus 0.1
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/README +16 -0
- data/bin/spotify-dbus +7 -0
- data/lib/spotify-dbus.rb +20 -0
- metadata +61 -0
data/README
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
DBus exmaple from:
|
2
|
+
https://gist.github.com/892428
|
3
|
+
|
4
|
+
|
5
|
+
Install:
|
6
|
+
|
7
|
+
gem install spotify-dbus
|
8
|
+
|
9
|
+
./spotify Pause
|
10
|
+
./spotify Play
|
11
|
+
|
12
|
+
|
13
|
+
List of Available methods:
|
14
|
+
|
15
|
+
"Next", "Previous", "Pause", "PlayPause", "Stop", "Play", "Seek", "SetPosition", "OpenUri"
|
16
|
+
|
data/bin/spotify-dbus
ADDED
data/lib/spotify-dbus.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'dbus'
|
2
|
+
|
3
|
+
module Spotify
|
4
|
+
class << self
|
5
|
+
def player
|
6
|
+
@@player ||= player_object
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def player_object
|
12
|
+
dbus = DBus::SessionBus.instance
|
13
|
+
service = dbus.service('org.mpris.MediaPlayer2.spotify')
|
14
|
+
object = service.object('/org/mpris/MediaPlayer2')
|
15
|
+
object.introspect
|
16
|
+
|
17
|
+
object['org.mpris.MediaPlayer2.Player']
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: spotify-dbus
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.1'
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- mikeycgto
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-07-15 00:00:00.000000000 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: ruby-dbus
|
17
|
+
requirement: &22498300 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.6.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *22498300
|
26
|
+
description: Simple module and bin for Spotify DBus interfacing
|
27
|
+
email: mikeycgto@gmail.com
|
28
|
+
executables:
|
29
|
+
- spotify-dbus
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- README
|
34
|
+
- bin/spotify-dbus
|
35
|
+
- lib/spotify-dbus.rb
|
36
|
+
has_rdoc: true
|
37
|
+
homepage: https://github.com/mikeycgto/spotify-dbus
|
38
|
+
licenses: []
|
39
|
+
post_install_message:
|
40
|
+
rdoc_options: []
|
41
|
+
require_paths:
|
42
|
+
- lib
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
requirements: []
|
56
|
+
rubyforge_project:
|
57
|
+
rubygems_version: 1.5.2
|
58
|
+
signing_key:
|
59
|
+
specification_version: 3
|
60
|
+
summary: Simple module and bin for Spotify DBus interfacing!
|
61
|
+
test_files: []
|