Skip to content

Commit f335c13

Browse files
authored
fix: Update pychromecast requirement plus fixes (#429)
* Update pychromecast requirement * Update changelog * Fix volumemute functionality
1 parent 585b8d2 commit f335c13

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Changelog
22

33

4+
## Unreleased
5+
6+
### Features
7+
8+
* Add volumemute command (#427) [neurodiv-eric]
9+
10+
411
## v0.12.10 (2023-01-30)
512

613
### Features

catt/controllers.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ def media_info(self):
315315

316316
@property
317317
def cast_info(self):
318-
cinfo = {"volume_level": str(int(round(self._cast.status.volume_level, 2) * 100))}
318+
cinfo = {
319+
"volume_level": str(int(round(self._cast.status.volume_level, 2) * 100)),
320+
"volume_muted": self._cast.status.volume_muted
321+
}
319322

320323
if self._is_idle:
321324
return cinfo

catt/util.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ def echo_status(status):
3535
if status.get("player_state"):
3636
click.echo("State: {}".format(status["player_state"]))
3737

38-
if status.get("volume_level"):
39-
click.echo("Volume: {}".format(status["volume_level"]))
40-
41-
if status.get("volume_muted"):
42-
click.echo("Volume muted: {}".format(status["is_volume_muted"]))
38+
click.echo("Volume: {}".format(status["volume_level"]))
39+
click.echo("Volume muted: {}".format(status["volume_muted"]))
4340

4441

4542
def guess_mime(path):

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ catt = "catt.cli:main"
2828
python = ">=3.7"
2929
click = ">=7.1.2"
3030
ifaddr = ">=0.1.7"
31-
pychromecast = ">=12.1.4, <13"
31+
pychromecast = ">=13.0.7, <14"
3232
requests = ">=2.23.0"
33-
yt-dlp = ">=2022.6.22.1"
33+
yt-dlp = ">=2023.3.4"
3434

3535
[tool.poetry.dev-dependencies]
3636
coverage = "*"

realcc_tests/test_procedure.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def run(self) -> bool:
122122
CattTest("set volume to 100", ["volume", "100"], sleep=2, check_data=("volume_level", 1.0)),
123123
CattTest("lower volume by 50 ", ["volumedown", "50"], sleep=2, check_data=("volume_level", 0.5)),
124124
CattTest("raise volume by 50", ["volumeup", "50"], sleep=2, check_data=("volume_level", 1.0)),
125-
CattTest("mute the media volume", ["volumemute", "True"], sleep=2, check_data=("is_volume_muted", True)),
126-
CattTest("unmute the media volume", ["volumemute", "False"], sleep=2, check_data=("is_volume_muted", False)),
125+
CattTest("mute the media volume", ["volumemute", "True"], sleep=2, check_data=("volume_muted", True)),
126+
CattTest("unmute the media volume", ["volumemute", "False"], sleep=2, check_data=("volume_muted", False)),
127127
CattTest(
128128
"cast h264 320x184 / aac content from dailymotion",
129129
["cast", "-y", "format=http-240-1", "http://www.dailymotion.com/video/x6fotne"],

0 commit comments

Comments
 (0)