Commit Graph

41 Commits (36e47473c50db42a54ae6292e4634efcf972034a)

Author SHA1 Message Date
Adam Mills 469472914b Add SUPPORT_PLAY flag (#5181)
* Add SUPPORT_PLAY flag

* Add SUPPPORT_PLAY to existing media players

* Leave usage of new flag to device devs
2017-01-09 01:09:30 +01:00
dasos fd50201407 Squeezebox JSON-RPC (#5084)
* Refactor of Squeezebox connection code

* Refactor of Squeezebox connection code

* Typos

* Make Python 3.4 friendly

* Addressing comments

* Improving docstring

* Using discovered port

* Style better

* Accept new disco object

* Revert "Accept new disco object"

* Make it obvious that port isn't discovered yet

* Flake8. ;)
2017-01-08 14:32:15 +01:00
Magnus Ihse Bursie 98efbbc129 Fix typo. (#5087) 2016-12-28 08:12:10 +01:00
Martin Wood e7ffec87ac Squeezebox name fix #4019 2016-11-14 21:46:05 +00:00
Paulus Schoutsen ee5f228309 Make services yield (#4187)
* Make services yield

* Disable pylint abstract-method check

* add input_select

* add input_slider

* change to async vers.

* fix lint

* yield on add_entities as other components does
2016-11-03 18:32:14 -07:00
Fabian Affolter be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Erik Eriksson 3317b4916b OSError is alias for IOException and base class for many other exceptions - no need to catch redundant exceptions if OSError already present in except-clause (#4111) 2016-10-29 15:33:56 -07:00
dasos 754d536974 Work better with password-protected Squeezebox / LMS servers (#3953)
* Work better with password-protected Squeezebox / LMS servers, including getting file art. Refactored to only have a single method calling the telent lib. (Should make it easier to convert to the more appropriate JSON interface)

* Update squeezebox.py

* Update squeezebox.py

* Update squeezebox.py

* Update squeezebox.py

* Update squeezebox.py
2016-10-21 22:37:35 -07:00
Scott Reston 39a446c43c Proper title, added album and artist for Squeezebox (#3735)
* Proper title, added album and artist

Title had previously concatenated artist - title.

* Made changes suggested by @balloobbot
2016-10-13 09:07:10 -07:00
Erik Eriksson 1c24018fbb Improved exception handling (#3746) 2016-10-07 17:16:35 -07:00
Sytone d5912f41fb Added play media to squeezebox (#3306)
* Added play media to squeezebox

The squeezebox component can now add a URI to an existing playlist or just over write it to force a stream to play.

* Cleaned up flake8 issues with formatting. 

Spacing... The end of the world! Fixed. Once day the tools will fix this on the fly, one day...

[x] ./homeassistant/components/media_player/squeezebox.py:307:1: W293 blank line contains whitespace
[x] ./homeassistant/components/media_player/squeezebox.py:366:1: W391 blank line at end of file
[x] ./homeassistant/components/media_player/squeezebox.py:366:1: W293 blank line contains whitespace

Updated SUPPORT_SQUEEZEBOX to add SUPPORT_PLAY_MEDIA

[x] ./homeassistant/components/media_player/squeezebox.py:13:1: F401 'homeassistant.components.media_player.SUPPORT_PLAY_MEDIA' imported but unused

* Updates from review

Updated the comments to indicate they are developer / API comments and not for end users.
Marked the private functions with a leading underscore (_)

* Fixed Lint issues. 

202ERROR: InvocationError: '/home/travis/build/home-assistant/home-assistant/.tox/lint/bin/flake8'

203lint runtests: commands[1] | pylint homeassistant

204************* Module homeassistant.components.media_player.squeezebox

205C:322, 0: Trailing whitespace (trailing-whitespace)
2016-09-23 00:05:33 -07:00
Fabian Affolter 428db4a644 Use voluptuous for SqueezeBox (#3212)
* Migrate to voluptuous

* Remove name
2016-09-05 19:27:06 +02:00
Jan Harkes 2d91dce6d0 Assume we only run one Logitech Media server on a host.
Because the LMS discovery mechanism uses the SlimProto protocol to discover the
presence of a Logitech Media server which operates on port 3483/udp and
3483/tcp. But HA uses a different 'CLI' protocol that is typically on port
9090/tcp to query player state.

However the CLI port number is configurable and if someone runs the CLI on a
different port, and has the server configured in configuration.yaml, we get an
error in the logs when we try to connect to 9090/tcp when we find the server
through discovery. Because of the way local slim player discover the server
using SlimProto we can be fairly certain only a single server will run on a
given IP address so if one is already configured with a user defined port, we
should ignore the discovered one that assumes the default port.
2016-03-23 14:47:29 -04:00
Jan Harkes c2204433bd Add discovery for squeezebox (logitech media) servers. 2016-03-17 09:38:56 -04:00
Fabian Affolter cf7c2c492a Fix PEP257 issues 2016-03-08 10:34:33 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen e7e540d4bb Clean up and test media player 2016-02-02 00:31:36 -08:00
Erik ec2b433733 should be _id 2016-01-23 18:55:43 +01:00
Erik 492c4b7f00 style 2016-01-23 18:14:03 +01:00
Erik b3beb9f3c9 style 2016-01-23 18:08:54 +01:00
Erik 837e7affa7 only query artwork by track_id if id is available (7.7 vs 7.9 version issue?) 2016-01-23 17:48:14 +01:00
Erik 58ef69b95d less hacky way of getting unique cover art 2016-01-20 16:31:51 +01:00
Erik 54f65ae87d 1) artwork_url might be a relative url (such as /imageproxy). in that case, join it with the base url. note: urllib.parse.urljoin will handle case when the artwork url is absolute. 2) artwork would not be replaced in the user interface because the url did not change between tracks (http://.../cover.jpg). solved by appending internal hash of the media title to the url to force reload 2016-01-20 10:57:39 +01:00
Paulus Schoutsen 3b7b12bbd5 Make Flake8 happy 2016-01-12 21:53:27 -08:00
Daren Lord 2812fae721 Fixing bug when connecting to squeezebox and it is a float 2015-11-11 16:21:42 -07:00
Fabian Affolter 97f9f8aa49 Update link to docs (Jekyll 3 update) 2015-11-09 13:12:18 +01:00
Fabian Affolter 84a9a300d6 Fix link 2015-10-23 18:13:28 +02:00
Fabian Affolter 55718aac66 Remove configuration details 2015-10-23 18:10:32 +02:00
Per Sandström 5b7389de55 bugfix, 1 = force pause 2015-10-18 21:05:30 +02:00
Per Sandstrom 2fb2d5c1d6 use id instead of name when updating players 2015-09-08 20:59:54 +02:00
Fabian Affolter 1d910f3a84 Update docstring (config file) and attempt to honor PEP0257 more 2015-09-07 18:35:00 +02:00
Per Sandstrom b681cf2eaa removed unnecessary log row 2015-08-06 09:27:23 +02:00
Per Sandstrom 9ead39e703 added turn on/off support 2015-08-06 09:05:27 +02:00
Per Sandstrom 393e88e732 add to .coveragerc 2015-08-05 22:25:03 +02:00
Per Sandstrom 03f93063f8 fixed flake8 issues 2015-08-05 20:09:20 +02:00
Per Sandstrom eb83621fce fixing pylint issues 2015-08-05 20:02:39 +02:00
Per Sandstrom db2cbf33c3 Added support for multiple players 2015-08-05 13:49:45 +02:00
Per Sandstrom 30e24296c4 Fixed flake8 2015-08-04 20:30:01 +02:00
Per Sandstrom e6c09f7413 Fixed bug with password protected LMS 2015-08-04 20:08:48 +02:00
Per Sandstrom 4284a3f5dc Fixed pylint conventions 2015-08-04 19:35:53 +02:00
Per Sandstrom bed30a5307 added support for logitech squeezebox 2015-08-04 17:22:56 +02:00