lib/sonos/endpoint/a_v_transport.rb in sonos-0.3.3 vs lib/sonos/endpoint/a_v_transport.rb in sonos-0.3.4

- old
+ new

@@ -69,13 +69,11 @@ # Seeks to a given timestamp in the current track # @param [Fixnum] seconds def seek(seconds = 0) # Must be sent in the format of HH:MM:SS timestamp = Time.at(seconds).utc.strftime('%H:%M:%S') - send_transport_message('Seek', "<Unit>REL_TIME</Unit><Target>#{timestamp}</Target>") - end # Clear the queue def clear_queue send_transport_message('RemoveAllTracksFromQueue') @@ -128,10 +126,10 @@ def set_av_transport_uri(uri) send_transport_message('SetAVTransportURI', "<CurrentURI>#{uri}</CurrentURI><CurrentURIMetaData></CurrentURIMetaData>") end def transport_client - @transport_client ||= Savon.client endpoint: "http://#{self.ip}:#{Sonos::PORT}#{TRANSPORT_ENDPOINT}", namespace: Sonos::NAMESPACE + @transport_client ||= Savon.client endpoint: "http://#{self.group_master.ip}:#{Sonos::PORT}#{TRANSPORT_ENDPOINT}", namespace: Sonos::NAMESPACE, log_level: :error end def send_transport_message(name, part = '<Speed>1</Speed>') action = "#{TRANSPORT_XMLNS}##{name}" message = %Q{<u:#{name} xmlns:u="#{TRANSPORT_XMLNS}"><InstanceID>0</InstanceID>#{part}</u:#{name}>}