soco-cli 0.4.63__tar.gz → 0.4.64__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.
Files changed (39) hide show
  1. {soco-cli-0.4.63/soco_cli.egg-info → soco-cli-0.4.64}/PKG-INFO +1 -1
  2. {soco-cli-0.4.63 → soco-cli-0.4.64}/README.md +2 -1
  3. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/__init__.py +1 -1
  4. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/action_processor.py +29 -0
  5. {soco-cli-0.4.63 → soco-cli-0.4.64/soco_cli.egg-info}/PKG-INFO +1 -1
  6. {soco-cli-0.4.63 → soco-cli-0.4.64}/LICENSE +0 -0
  7. {soco-cli-0.4.63 → soco-cli-0.4.64}/MANIFEST.in +0 -0
  8. {soco-cli-0.4.63 → soco-cli-0.4.64}/PYPI_README.md +0 -0
  9. {soco-cli-0.4.63 → soco-cli-0.4.64}/pyproject.toml +0 -0
  10. {soco-cli-0.4.63 → soco-cli-0.4.64}/requirements.txt +0 -0
  11. {soco-cli-0.4.63 → soco-cli-0.4.64}/setup.cfg +0 -0
  12. {soco-cli-0.4.63 → soco-cli-0.4.64}/setup.py +0 -0
  13. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/__main__.py +0 -0
  14. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/alarms.py +0 -0
  15. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/aliases.py +0 -0
  16. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/api.py +0 -0
  17. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/check_for_update.py +0 -0
  18. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/cmd_parser.py +0 -0
  19. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/http_api.py +0 -0
  20. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/interactive.py +0 -0
  21. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/keystroke_capture.py +0 -0
  22. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/m3u_parser.py +0 -0
  23. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/match_speaker_names.py +0 -0
  24. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/play_local_file.py +0 -0
  25. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/play_local_file_lists.py +0 -0
  26. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/sonos.py +0 -0
  27. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/sonos_discover.py +0 -0
  28. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/speaker_info.py +0 -0
  29. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/speakers.py +0 -0
  30. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/track_follow.py +0 -0
  31. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/utils.py +0 -0
  32. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli/wait_actions.py +0 -0
  33. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli.egg-info/SOURCES.txt +0 -0
  34. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli.egg-info/dependency_links.txt +0 -0
  35. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli.egg-info/entry_points.txt +0 -0
  36. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli.egg-info/requires.txt +0 -0
  37. {soco-cli-0.4.63 → soco-cli-0.4.64}/soco_cli.egg-info/top_level.txt +0 -0
  38. {soco-cli-0.4.63 → soco-cli-0.4.64}/tests/test_cli.py +0 -0
  39. {soco-cli-0.4.63 → soco-cli-0.4.64}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: soco-cli
3
- Version: 0.4.63
3
+ Version: 0.4.64
4
4
  Summary: Sonos command line control utility, based on SoCo
5
5
  Author-email: Avantrec Ltd <soco_cli@avantrec.com>
6
6
  Project-URL: Homepage, https://github.com/avantrec/soco-cli
@@ -473,7 +473,8 @@ The following operate on the stations in TuneIn's 'My Radio Stations' list.
473
473
 
474
474
  ### Grouping and Stereo Pairing
475
475
 
476
- - **`group <master_speaker>`(or `g`)**: Groups the speaker with `<master_speaker>`.
476
+ - **`group <master_speaker>`(or `g`)**: Groups the speaker with `<master_speaker>`, which acts as the coordinator.
477
+ - **`multi_group <slave_speaker> [<slave_speaker> ...]`**: Groups one or more speakers with the target speaker, which acts as the coordinator.
477
478
  - **`pair <right_hand_speaker>`**: Creates a stereo pair, where the target speaker becomes the left-hand speaker of the pair and `<right_hand_speaker>` becomes the right-hand of the pair. Can be used to pair dissimilar Sonos devices (e.g., to stereo-pair a Play:1 with a One). The left-hand speaker becomes the coordinator speaker, and the stereo pair will adopt its name.
478
479
  - **`party_mode` (or `party`)**: Adds all speakers in the system into a single group. The target speaker becomes the group coordinator. Remove speakers individually using `ungroup`, or use `ungroup_all`.
479
480
  - **`transfer_playback <target_speaker>` (or `transfer_to`, `transfer`)**: Transfers playback to <target_speaker>. This is achieved by grouping and ungrouping the speakers, and swapping the group coordinator. It's a convenience shortcut for `speaker1 group speaker2 : speaker1 ungroup`.
@@ -10,4 +10,4 @@ server, to control Sonos via HTTP requests.
10
10
  For more information, please see: https://github.com/avantrec/soco-cli
11
11
  """
12
12
 
13
- __version__ = "0.4.63"
13
+ __version__ = "0.4.64"
@@ -939,6 +939,33 @@ def group_or_pair(speaker, action, args, soco_function, use_local_speaker_list):
939
939
  return True
940
940
 
941
941
 
942
+ @one_or_more_parameters
943
+ def multi_group(speaker, action, args, soco_function, use_local_speaker_list):
944
+ """
945
+ Group one or more speakers with a coordinator speaker. Note: reverses the usual
946
+ order; the target speaker is the coordinator, not the speaker to be grouped.
947
+ """
948
+ logging.info("Grouping speakers '{}' with '{}'".format(args, speaker.player_name))
949
+ for index in range(len(args)):
950
+ target_speaker = get_speaker(args[index], use_local_speaker_list)
951
+ if not target_speaker:
952
+ error_report("Speaker '{}' not found".format(args[index]))
953
+ continue
954
+ logging.info(
955
+ "Grouping speaker '{}' with coordinator '{}'".format(
956
+ target_speaker.player_name, speaker.player_name
957
+ )
958
+ )
959
+ group_or_pair(
960
+ target_speaker,
961
+ action,
962
+ [speaker.player_name],
963
+ soco_function,
964
+ use_local_speaker_list,
965
+ )
966
+ return True
967
+
968
+
942
969
  @zero_parameters
943
970
  def operate_on_all(speaker, action, args, soco_function, use_local_speaker_list):
944
971
  zones = speaker.all_zones
@@ -2847,6 +2874,8 @@ actions = {
2847
2874
  "sleep": SonosFunction(sleep_timer, "sleep_timer", True),
2848
2875
  "group": SonosFunction(group_or_pair, "join"),
2849
2876
  "g": SonosFunction(group_or_pair, "join"),
2877
+ "multi_group": SonosFunction(multi_group, "join"),
2878
+ "mg": SonosFunction(multi_group, "join"),
2850
2879
  "ungroup": SonosFunction(no_args_no_output, "unjoin"),
2851
2880
  "ug": SonosFunction(no_args_no_output, "unjoin"),
2852
2881
  "u": SonosFunction(no_args_no_output, "unjoin"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: soco-cli
3
- Version: 0.4.63
3
+ Version: 0.4.64
4
4
  Summary: Sonos command line control utility, based on SoCo
5
5
  Author-email: Avantrec Ltd <soco_cli@avantrec.com>
6
6
  Project-URL: Homepage, https://github.com/avantrec/soco-cli
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