pyblu 0.3.0__tar.gz → 0.3.2__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.
- {pyblu-0.3.0 → pyblu-0.3.2}/PKG-INFO +1 -1
- {pyblu-0.3.0 → pyblu-0.3.2}/pyproject.toml +1 -1
- {pyblu-0.3.0 → pyblu-0.3.2}/src/pyblu/_entities.py +7 -0
- {pyblu-0.3.0 → pyblu-0.3.2}/src/pyblu/_parse.py +3 -0
- {pyblu-0.3.0 → pyblu-0.3.2}/LICENSE +0 -0
- {pyblu-0.3.0 → pyblu-0.3.2}/README.md +0 -0
- {pyblu-0.3.0 → pyblu-0.3.2}/src/pyblu/__init__.py +0 -0
- {pyblu-0.3.0 → pyblu-0.3.2}/src/pyblu/_player.py +0 -0
|
@@ -8,6 +8,8 @@ class Status:
|
|
|
8
8
|
|
|
9
9
|
input_id: str | None
|
|
10
10
|
"""Unique id of the input. Is not set for radio."""
|
|
11
|
+
service: str
|
|
12
|
+
"""Service id of current input. 'Capture' for regular inputs."""
|
|
11
13
|
|
|
12
14
|
state: str
|
|
13
15
|
"""Playback state"""
|
|
@@ -39,6 +41,8 @@ class Status:
|
|
|
39
41
|
"""Current playback position in seconds"""
|
|
40
42
|
total_seconds: float
|
|
41
43
|
"""Total track length in seconds"""
|
|
44
|
+
can_seek: bool
|
|
45
|
+
"""True if the current track can be seeked"""
|
|
42
46
|
|
|
43
47
|
sleep: int
|
|
44
48
|
"""Sleep timer in minutes. 0 means the sleep timer is off."""
|
|
@@ -48,6 +52,9 @@ class Status:
|
|
|
48
52
|
group_volume: int | None
|
|
49
53
|
"""Volume level of the group. Only present on master. Range is 0-100."""
|
|
50
54
|
|
|
55
|
+
indexing: bool
|
|
56
|
+
"""True if the player is currently indexing."""
|
|
57
|
+
|
|
51
58
|
|
|
52
59
|
@dataclass
|
|
53
60
|
class PairedPlayer:
|
|
@@ -77,6 +77,7 @@ def parse_status(response_dict: dict[str, Any]) -> Status:
|
|
|
77
77
|
status = Status(
|
|
78
78
|
etag=chained_get(response_dict, "status", "@etag"),
|
|
79
79
|
input_id=chained_get(response_dict, "status", "inputId"),
|
|
80
|
+
service=chained_get(response_dict, "status", "service"),
|
|
80
81
|
state=chained_get(response_dict, "status", "state"),
|
|
81
82
|
shuffle=chained_get(response_dict, "status", "shuffle") == "1",
|
|
82
83
|
album=album,
|
|
@@ -90,9 +91,11 @@ def parse_status(response_dict: dict[str, Any]) -> Status:
|
|
|
90
91
|
mute_volume_db=chained_get(response_dict, "status", "muteDb", _map=int),
|
|
91
92
|
seconds=chained_get(response_dict, "status", "secs", _map=int),
|
|
92
93
|
total_seconds=chained_get(response_dict, "status", "totlen", _map=float),
|
|
94
|
+
can_seek=chained_get(response_dict, "status", "canSeek") == "1",
|
|
93
95
|
sleep=chained_get(response_dict, "status", "sleep", _map=int, default=0),
|
|
94
96
|
group_name=chained_get(response_dict, "status", "groupName"),
|
|
95
97
|
group_volume=chained_get(response_dict, "status", "groupVolume", _map=int),
|
|
98
|
+
indexing=chained_get(response_dict, "status", "indexing") == "1",
|
|
96
99
|
)
|
|
97
100
|
|
|
98
101
|
return status
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|