soco 0.31.2__tar.gz → 0.31.4__tar.gz
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.
- {soco-0.31.2/soco.egg-info → soco-0.31.4}/PKG-INFO +1 -1
- {soco-0.31.2 → soco-0.31.4}/soco/__init__.py +1 -1
- {soco-0.31.2 → soco-0.31.4}/soco/core.py +20 -4
- {soco-0.31.2 → soco-0.31.4}/soco/events_base.py +8 -0
- {soco-0.31.2 → soco-0.31.4/soco.egg-info}/PKG-INFO +1 -1
- {soco-0.31.2 → soco-0.31.4}/tests/test_core.py +20 -1
- {soco-0.31.2 → soco-0.31.4}/tests/test_events.py +38 -2
- {soco-0.31.2 → soco-0.31.4}/AUTHORS.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/LICENSE.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/MANIFEST.in +0 -0
- {soco-0.31.2 → soco-0.31.4}/README.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/dev_tools/analyse_ws.ini +0 -0
- {soco-0.31.2 → soco-0.31.4}/dev_tools/analyse_ws.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/dev_tools/pychecker.bat +0 -0
- {soco-0.31.2 → soco-0.31.4}/dev_tools/pychecker.sh +0 -0
- {soco-0.31.2 → soco-0.31.4}/dev_tools/sonosdump.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/Makefile +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/_static/imageMapResizer.min.js +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/_templates/page.html +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/advanced/data-structures-mod.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/advanced/events.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/advanced/events_asyncio.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/advanced/events_twisted.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/advanced/index.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/advanced/services.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/advanced/topology.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.alarms.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.cache.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.config.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.core.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.data_structures.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.discovery.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.events.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.exceptions.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.groups.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.ms_data_structures.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.music_library.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.music_services.accounts.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.music_services.music_service.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.music_services.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.music_services.token_store.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.plugins.example.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.plugins.plex.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.plugins.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.plugins.sharelink.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.plugins.spotify.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.plugins.wimp.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.services.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.snapshot.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.soap.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.utils.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/api/soco.xml.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/authors.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/conf.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/development/index.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/development/release-howto.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/development/unittests.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/examples.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/faq.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/getting_started.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/graphics/data_structures.png +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/graphics/data_structures.svg +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/index.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/make.bat +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/plugins.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/release_notes.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.10.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.11.1.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.11.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.12.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.13.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.14.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.15.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.16.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.17.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.18.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.19.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.20.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.21.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.22.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.23.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.24.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.25.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.26.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.27.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.28.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.29.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.30.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.31.0.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.6.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.7.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.8.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/0.9.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/releases/index.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/requirements.txt +0 -0
- {soco-0.31.2 → soco-0.31.4}/doc/tutorial.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/commandline/README.rst +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/commandline/discover.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/commandline/screenshot.png +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/commandline/tunein.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/events_asyncio_verify_listener_fix.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/play_local_files/play_local_files.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/plugins/socoplugins.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/snapshot/basic_snap.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/snapshot/multi_zone_snap.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/.gitignore +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/README.md +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/index.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/requirements.txt +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/screenshot.png +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/settings.py.example +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/static/css/bootstrap.min.css +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/static/css/main.css +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/static/img/blank.jpg +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/static/img/glyphicons-halflings-white.png +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/static/img/glyphicons-halflings.png +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/static/js/bootstrap.min.js +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/static/js/jquery.min.js +0 -0
- {soco-0.31.2 → soco-0.31.4}/examples/webapp/templates/index.html +0 -0
- {soco-0.31.2 → soco-0.31.4}/makefile +0 -0
- {soco-0.31.2 → soco-0.31.4}/pylintrc +0 -0
- {soco-0.31.2 → soco-0.31.4}/pyproject.toml +0 -0
- {soco-0.31.2 → soco-0.31.4}/requirements-dev.txt +0 -0
- {soco-0.31.2 → soco-0.31.4}/requirements.txt +0 -0
- {soco-0.31.2 → soco-0.31.4}/setup.cfg +0 -0
- {soco-0.31.2 → soco-0.31.4}/setup.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/alarms.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/cache.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/config.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/data_structure_quirks.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/data_structures.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/data_structures_entry.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/discovery.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/events.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/events_asyncio.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/events_twisted.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/exceptions.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/groups.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/ms_data_structures.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/music_library.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/music_services/__init__.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/music_services/accounts.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/music_services/data_structures.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/music_services/music_service.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/music_services/token_store.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/plugins/__init__.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/plugins/example.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/plugins/plex.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/plugins/sharelink.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/plugins/spotify.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/plugins/wimp.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/services.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/snapshot.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/soap.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/utils.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/xml.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco/zonegroupstate.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco.egg-info/SOURCES.txt +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco.egg-info/dependency_links.txt +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco.egg-info/requires.txt +0 -0
- {soco-0.31.2 → soco-0.31.4}/soco.egg-info/top_level.txt +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/conftest.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/album.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/album.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/album_compilation.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/album_favorite.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/album_list.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/artist.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/artist.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/audio_broadcast.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/audio_broadcast.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/composer.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/composer.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/genre.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/genre.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/playlist.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/playlist.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/playlist_favorite.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/radio_show.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/radio_show.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/recent_show.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/same_artist.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/share.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/share.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/source_linein.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/track.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/track.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/tracklist.xml +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/media_metadata_payloads/bbc.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/media_metadata_payloads/cifs.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/media_metadata_payloads/pandora.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/media_metadata_payloads/sonos_radio.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/media_metadata_payloads/tunein.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/data/media_metadata_payloads/tunein_2.json +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/official_and_extended_didl_classes.txt +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/soco_unittest.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_alarms.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_cache.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_data_structures_entry_integration.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_discovery.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_events_asyncio.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_integration.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_metadata_parsing.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_ms_data_structures.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_music_library.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_music_service_data_structures.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_musicservices.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_new_datastructures.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_services.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_singleton.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_snapshot.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_soap.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_utils.py +0 -0
- {soco-0.31.2 → soco-0.31.4}/tests/test_xml.py +0 -0
|
@@ -17,7 +17,7 @@ from .exceptions import SoCoException, UnknownSoCoException
|
|
|
17
17
|
__author__ = "The SoCo-Team <python-soco@googlegroups.com>"
|
|
18
18
|
# Please increment the version number and add the suffix "-dev" after
|
|
19
19
|
# a release, to make it possible to identify in-development code
|
|
20
|
-
__version__ = "0.31.
|
|
20
|
+
__version__ = "0.31.4"
|
|
21
21
|
__website__ = "https://github.com/SoCo/SoCo"
|
|
22
22
|
__license__ = "MIT License"
|
|
23
23
|
|
|
@@ -567,6 +567,18 @@ class SoCo(_SocoSingletonBase):
|
|
|
567
567
|
|
|
568
568
|
return self.speaker_info["model_name"].lower().endswith(ARC_ULTRA_PRODUCT_NAME)
|
|
569
569
|
|
|
570
|
+
@property
|
|
571
|
+
def is_ultra_soundbar(self):
|
|
572
|
+
"""bool: Is this zone an Ultra sound bar (Arc Ultra, Beam Ultra)?
|
|
573
|
+
|
|
574
|
+
Ultra sound bars expose a 5-level dialog level and a separate
|
|
575
|
+
speech enhancement on/off switch.
|
|
576
|
+
"""
|
|
577
|
+
if not self.speaker_info:
|
|
578
|
+
self.get_speaker_info()
|
|
579
|
+
|
|
580
|
+
return self.speaker_info["model_name"].lower().endswith(ULTRA_SOUNDBARS)
|
|
581
|
+
|
|
570
582
|
@property
|
|
571
583
|
def play_mode(self):
|
|
572
584
|
"""str: The queue's play mode.
|
|
@@ -1495,7 +1507,7 @@ class SoCo(_SocoSingletonBase):
|
|
|
1495
1507
|
|
|
1496
1508
|
True if on, False if off, None if not supported.
|
|
1497
1509
|
"""
|
|
1498
|
-
if not self.
|
|
1510
|
+
if not self.is_ultra_soundbar:
|
|
1499
1511
|
return None
|
|
1500
1512
|
|
|
1501
1513
|
response = self.renderingControl.GetEQ(
|
|
@@ -1505,16 +1517,17 @@ class SoCo(_SocoSingletonBase):
|
|
|
1505
1517
|
|
|
1506
1518
|
@speech_enhance_enabled.setter
|
|
1507
1519
|
def speech_enhance_enabled(self, speech_mode):
|
|
1508
|
-
"""Switch on/off the
|
|
1520
|
+
"""Switch on/off the Ultra soundbar speech enhancement.
|
|
1509
1521
|
|
|
1510
1522
|
:param speech_mode: Enable or disable dialog mode
|
|
1511
1523
|
:type speech_mode: bool
|
|
1512
1524
|
:raises NotSupportedException: If the device does not support
|
|
1513
1525
|
speech enhancement.
|
|
1514
1526
|
"""
|
|
1515
|
-
if not self.
|
|
1527
|
+
if not self.is_ultra_soundbar:
|
|
1516
1528
|
raise NotSupportedException(
|
|
1517
|
-
"The device not
|
|
1529
|
+
"The device is not an Ultra soundbar and doesn't support "
|
|
1530
|
+
"speech_enhance_enabled."
|
|
1518
1531
|
)
|
|
1519
1532
|
self.renderingControl.SetEQ(
|
|
1520
1533
|
[
|
|
@@ -3102,6 +3115,7 @@ SOUNDBARS = (
|
|
|
3102
3115
|
"arc sl",
|
|
3103
3116
|
"arc ultra",
|
|
3104
3117
|
"beam",
|
|
3118
|
+
"beam ultra",
|
|
3105
3119
|
"playbase",
|
|
3106
3120
|
"playbar",
|
|
3107
3121
|
"ray",
|
|
@@ -3109,6 +3123,8 @@ SOUNDBARS = (
|
|
|
3109
3123
|
)
|
|
3110
3124
|
|
|
3111
3125
|
ARC_ULTRA_PRODUCT_NAME = "arc ultra"
|
|
3126
|
+
BEAM_ULTRA_PRODUCT_NAME = "beam ultra"
|
|
3127
|
+
ULTRA_SOUNDBARS = (ARC_ULTRA_PRODUCT_NAME, BEAM_ULTRA_PRODUCT_NAME)
|
|
3112
3128
|
|
|
3113
3129
|
if config.SOCO_CLASS is None:
|
|
3114
3130
|
config.SOCO_CLASS = SoCo
|
|
@@ -772,8 +772,16 @@ def get_listen_ip(ip_address):
|
|
|
772
772
|
return config.EVENT_LISTENER_IP
|
|
773
773
|
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
774
774
|
try:
|
|
775
|
+
# A UDP connect() only sets the default destination after a local
|
|
776
|
+
# route lookup, but asyncio blocking-call detectors flag connect() on
|
|
777
|
+
# any blocking socket, so make it non-blocking (#978).
|
|
778
|
+
sock.setblocking(False)
|
|
775
779
|
sock.connect((ip_address, config.EVENT_LISTENER_PORT))
|
|
776
780
|
return sock.getsockname()[0]
|
|
781
|
+
except BlockingIOError:
|
|
782
|
+
# Defensive: UDP connect() isn't expected to return EINPROGRESS, but
|
|
783
|
+
# if it does the local address has still been assigned.
|
|
784
|
+
return sock.getsockname()[0]
|
|
777
785
|
except OSError:
|
|
778
786
|
return None
|
|
779
787
|
finally:
|
|
@@ -4,7 +4,7 @@ import requests_mock
|
|
|
4
4
|
|
|
5
5
|
from conftest import IP_ADDR
|
|
6
6
|
from soco import SoCo
|
|
7
|
-
from soco.core import ARC_ULTRA_PRODUCT_NAME
|
|
7
|
+
from soco.core import ARC_ULTRA_PRODUCT_NAME, BEAM_ULTRA_PRODUCT_NAME
|
|
8
8
|
from soco.data_structures import to_didl_string
|
|
9
9
|
from soco.exceptions import (
|
|
10
10
|
SoCoSlaveException,
|
|
@@ -407,6 +407,8 @@ class TestSoco:
|
|
|
407
407
|
("Sonos Playbase", True),
|
|
408
408
|
("Sonos Arc", True),
|
|
409
409
|
("Sonos Arc SL", True),
|
|
410
|
+
("Sonos Arc Ultra", True),
|
|
411
|
+
("Sonos Beam Ultra", True),
|
|
410
412
|
),
|
|
411
413
|
)
|
|
412
414
|
def test_soco_is_soundbar(self, moco, model_name):
|
|
@@ -546,6 +548,23 @@ class TestSoco:
|
|
|
546
548
|
[("InstanceID", 0), ("EQType", "SpeechEnhanceEnabled"), ("DesiredValue", 1)]
|
|
547
549
|
)
|
|
548
550
|
|
|
551
|
+
# Beam Ultra exposes the same speech enhancement switch
|
|
552
|
+
moco_zgs.speaker_info["model_name"] = (
|
|
553
|
+
"speaker prefix " + BEAM_ULTRA_PRODUCT_NAME
|
|
554
|
+
)
|
|
555
|
+
moco_zgs.renderingControl.GetEQ.reset_mock()
|
|
556
|
+
moco_zgs.renderingControl.GetEQ.return_value = {"CurrentValue": "1"}
|
|
557
|
+
assert moco_zgs.speech_enhance_enabled == 1
|
|
558
|
+
moco_zgs.renderingControl.GetEQ.assert_called_once_with(
|
|
559
|
+
[("InstanceID", 0), ("EQType", "SpeechEnhanceEnabled")]
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
moco_zgs.renderingControl.SetEQ.reset_mock()
|
|
563
|
+
moco_zgs.speech_enhance_enabled = 0
|
|
564
|
+
moco_zgs.renderingControl.SetEQ.assert_called_once_with(
|
|
565
|
+
[("InstanceID", 0), ("EQType", "SpeechEnhanceEnabled"), ("DesiredValue", 0)]
|
|
566
|
+
)
|
|
567
|
+
|
|
549
568
|
|
|
550
569
|
class TestAVTransport:
|
|
551
570
|
@pytest.mark.parametrize(
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
"""Tests for the
|
|
1
|
+
"""Tests for the events_base module."""
|
|
2
|
+
|
|
3
|
+
from unittest import mock
|
|
2
4
|
|
|
3
5
|
import pytest
|
|
4
6
|
|
|
7
|
+
from soco import config
|
|
5
8
|
from soco.data_structures import DidlAudioLineIn
|
|
6
|
-
from soco.events_base import Event, parse_event_xml
|
|
9
|
+
from soco.events_base import Event, get_listen_ip, parse_event_xml
|
|
7
10
|
|
|
8
11
|
from conftest import DataLoader
|
|
9
12
|
|
|
@@ -124,3 +127,36 @@ def test_event_parsing_null_value():
|
|
|
124
127
|
# Before the fix this raised AttributeError: 'NoneType' has no attribute 'startswith'
|
|
125
128
|
result = parse_event_xml(event_xml)
|
|
126
129
|
assert result["current_track_uri"] is None
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def test_get_listen_ip_uses_non_blocking_connect():
|
|
133
|
+
"""get_listen_ip must use a non-blocking UDP connect (#978)."""
|
|
134
|
+
sock = mock.Mock()
|
|
135
|
+
sock.getsockname.return_value = ("192.168.1.50", 12345)
|
|
136
|
+
with mock.patch.object(config, "EVENT_LISTENER_IP", None):
|
|
137
|
+
with mock.patch("soco.events_base.socket.socket", return_value=sock):
|
|
138
|
+
result = get_listen_ip("192.168.1.42")
|
|
139
|
+
assert result == "192.168.1.50"
|
|
140
|
+
sock.setblocking.assert_called_once_with(False)
|
|
141
|
+
sock.connect.assert_called_once_with(("192.168.1.42", config.EVENT_LISTENER_PORT))
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def test_get_listen_ip_connect_in_progress():
|
|
145
|
+
"""A connect left in EINPROGRESS must still return the local IP."""
|
|
146
|
+
sock = mock.Mock()
|
|
147
|
+
sock.connect.side_effect = BlockingIOError("in progress")
|
|
148
|
+
sock.getsockname.return_value = ("192.168.1.50", 12345)
|
|
149
|
+
with mock.patch.object(config, "EVENT_LISTENER_IP", None):
|
|
150
|
+
with mock.patch("soco.events_base.socket.socket", return_value=sock):
|
|
151
|
+
result = get_listen_ip("192.168.1.42")
|
|
152
|
+
assert result == "192.168.1.50"
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def test_get_listen_ip_connect_failure():
|
|
156
|
+
"""An OSError from connect must return None."""
|
|
157
|
+
sock = mock.Mock()
|
|
158
|
+
sock.connect.side_effect = OSError("no route to host")
|
|
159
|
+
with mock.patch.object(config, "EVENT_LISTENER_IP", None):
|
|
160
|
+
with mock.patch("soco.events_base.socket.socket", return_value=sock):
|
|
161
|
+
result = get_listen_ip("192.168.1.42")
|
|
162
|
+
assert result is None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/album_compilation.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/audio_broadcast.json
RENAMED
|
File without changes
|
{soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/audio_broadcast.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{soco-0.31.2 → soco-0.31.4}/tests/data/data_structures_entry_integration/playlist_favorite.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|