sonos 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ ### Version 0.2.1 — December 24, 2012
2
+
3
+ * Fix album art in now playing
4
+
1
5
  ### Version 0.2.0 — December 24, 2012
2
6
 
3
7
  * Add Loudness setting
data/Readme.markdown CHANGED
@@ -64,21 +64,49 @@ There is a very limited CLI right now. You can run `sonos discover` to get the I
64
64
 
65
65
  ## To Do
66
66
 
67
+ ### General
68
+
67
69
  * Refactor all of the things
68
70
  * Nonblocking calls with Celluloid::IO
69
71
  * List other speakers
70
- * Loudness
71
- * Alarm clock
72
- * Group management
73
- * Party Mode
74
- * Join
75
- * Line-in (I don't have a PLAY:5, so I'll need help testing this one)
76
72
  * Handle errors better
77
- * Fix album art in `now_playing`
78
73
  * Handle line-in in `now_playing`
79
74
  * Better support for stero pairs
80
75
  * CLI client for everything
81
76
 
77
+ ### Features
78
+
79
+ * Alarm clock
80
+ * Pause all (there is no play all in the controller, we could loop through and do it though)
81
+ * Group management
82
+ * Party Mode
83
+ * Join
84
+ * Line-in
85
+ * Toggle cross fade
86
+ * Toggle shuffle
87
+ * Set repeat mode
88
+ * Scrub
89
+ * Search music library
90
+ * Browse music library
91
+ * Add songs to queue
92
+ * Skip to song in queue
93
+ * Sleep timer
94
+
95
+ ### Maybe
96
+
97
+ If we are implementing everything the official Sonos Controller does, here's some more stuff:
98
+
99
+ * Set zone name and icon
100
+ * Create stero pair
101
+ * Support for BRIDGE
102
+ * Support for DOCK
103
+ * Manage services
104
+ * Date and time
105
+ * Wireless channel
106
+ * Audio compression
107
+ * Automatically check for updates (not sure if this is a controller only preference)
108
+ * Local music servers
109
+
82
110
  ## Contributing
83
111
 
84
112
  1. Fork it
@@ -1,3 +1,5 @@
1
+ require 'uri'
2
+
1
3
  module Sonos::Endpoint::Transport
2
4
  TRANSPORT_ENDPOINT = '/MediaRenderer/AVTransport/Control'
3
5
  TRANSPORT_XMLNS = 'urn:schemas-upnp-org:service:AVTransport:1'
@@ -9,6 +11,11 @@ module Sonos::Endpoint::Transport
9
11
  body = response.body[:get_position_info_response]
10
12
  doc = Nokogiri::XML(body[:track_meta_data])
11
13
 
14
+ art_path = doc.xpath('//upnp:albumArtURI').inner_text
15
+
16
+ # TODO: No idea why this is necessary. Maybe its a Nokogiri thing
17
+ art_path.sub!('/getaa?s=1=x-sonos-http', '/getaa?s=1&u=x-sonos-http')
18
+
12
19
  {
13
20
  title: doc.xpath('//dc:title').inner_text,
14
21
  artist: doc.xpath('//dc:creator').inner_text,
@@ -17,7 +24,7 @@ module Sonos::Endpoint::Transport
17
24
  track_duration: body[:track_duration],
18
25
  current_position: body[:rel_time],
19
26
  uri: body[:track_uri],
20
- album_art: "http://#{self.ip}:#{PORT}#{doc.xpath('//upnp:albumArtURI').inner_text}"
27
+ album_art: "http://#{self.ip}:#{Sonos::PORT}#{art_path}"
21
28
  }
22
29
  end
23
30
 
data/lib/sonos/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sonos
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
data/sonos.gemspec CHANGED
@@ -18,5 +18,6 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ['lib']
19
19
 
20
20
  gem.add_dependency 'savon', '~> 2.0.2'
21
+ gem.add_dependency 'nokogiri'
21
22
  gem.add_dependency 'thor'
22
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sonos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -28,6 +28,22 @@ dependencies:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
30
  version: 2.0.2
31
+ - !ruby/object:Gem::Dependency
32
+ name: nokogiri
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
31
47
  - !ruby/object:Gem::Dependency
32
48
  name: thor
33
49
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
102
  version: '0'
87
103
  segments:
88
104
  - 0
89
- hash: -1695773237927316888
105
+ hash: -2990383853655204370
90
106
  required_rubygems_version: !ruby/object:Gem::Requirement
91
107
  none: false
92
108
  requirements:
@@ -95,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
111
  version: '0'
96
112
  segments:
97
113
  - 0
98
- hash: -1695773237927316888
114
+ hash: -2990383853655204370
99
115
  requirements: []
100
116
  rubyforge_project:
101
117
  rubygems_version: 1.8.23