/
/
/
1"""Universal Group Player constants."""
2
3from __future__ import annotations
4
5from typing import Final
6
7from music_assistant_models.config_entries import ConfigEntry
8from music_assistant_models.enums import ConfigEntryType
9from music_assistant_models.media_items import AudioFormat
10
11from music_assistant.constants import INTERNAL_PCM_FORMAT, create_sample_rates_config_entry
12
13UGP_PREFIX: Final[str] = "ugp_"
14
15
16CONF_ENTRY_SAMPLE_RATES_UGP = create_sample_rates_config_entry(
17 max_sample_rate=96000, max_bit_depth=24, hidden=True
18)
19CONFIG_ENTRY_UGP_NOTE = ConfigEntry(
20 key="ugp_note",
21 type=ConfigEntryType.ALERT,
22 label="Please note that although the Universal Group "
23 "allows you to group any player, it will not (and can not) enable audio sync "
24 "between players of different ecosystems. It is advised to always use native "
25 "player groups or sync groups when available for your player type(s) and use "
26 "the Universal Group only to group players of different ecosystems/protocols.",
27 required=False,
28)
29
30
31UGP_FORMAT = AudioFormat(
32 content_type=INTERNAL_PCM_FORMAT.content_type,
33 sample_rate=INTERNAL_PCM_FORMAT.sample_rate,
34 bit_depth=INTERNAL_PCM_FORMAT.bit_depth,
35)
36