ConfigValueOption("verbose", "VERBOSE"),
],
default_value="GLOBAL",
- category="advanced",
+ advanced=True,
requires_reload=False, # applied dynamically via _set_logger()
)
type=ConfigEntryType.BOOLEAN,
label="Enforce Gapless playback with Queue Flow Mode streaming",
default_value=False,
- category="advanced",
+ category="audio",
+ advanced=True,
requires_reload=True,
)
default_value="stereo",
label="Output Channel Mode",
category="audio",
+ advanced=True,
requires_reload=True,
)
label="Target level for volume normalization",
description="Adjust average (perceived) loudness to this target level",
depends_on=CONF_VOLUME_NORMALIZATION,
- category="advanced",
+ category="audio",
+ advanced=True,
requires_reload=True,
)
default_value=True,
description="Activates a limiter that prevents audio distortion by making loud peaks quieter.",
category="audio",
+ advanced=True,
requires_reload=True,
)
depends_on=CONF_SMART_FADES_MODE,
depends_on_value="standard_crossfade",
category="audio",
+ advanced=True,
requires_reload=True,
)
"Some players however do not support FLAC and require the stream to be packed "
"into e.g. a lossy mp3 codec or you like to save some network bandwidth. \n\n "
"Choosing a lossy codec saves some bandwidth at the cost of audio quality.",
- category="advanced",
+ category="audio",
+ advanced=True,
requires_reload=True,
)
description="If this player is playing audio synced with other players "
"and you always hear the audio too early or late on this player, "
"you can shift the audio a bit.",
- category="advanced",
+ category="audio",
+ advanced=True,
requires_reload=True,
)
default_value=[f"44100{MULTI_VALUE_SPLITTER}16", f"48000{MULTI_VALUE_SPLITTER}16"],
required=True,
label="Sample rates supported by this player",
- category="advanced",
+ category="audio",
+ advanced=True,
description="The sample rates (and bit depths) supported by this player.\n"
"Content with unsupported sample rates will be automatically resampled.",
requires_reload=True,
],
default_value="no_content_length",
label="HTTP Profile used for sending audio",
- category="advanced",
+ category="audio",
+ advanced=True,
description="This is considered to be a very advanced setting, only adjust this if needed, "
"for example if your player stops playing halfway streams or if you experience "
"other playback related issues. In most cases the default setting is fine.",
depends_on_value_not=False,
default_value="disabled",
label="Try to inject metadata into stream (ICY)",
- category="advanced",
+ category="audio",
+ advanced=True,
description="Try to inject metadata into the stream (ICY) to show track info on the player, "
"even when flow mode is enabled.\n\nThis is called ICY metadata and is what is used by "
"online radio stations to show you what is playing. \n\nBe aware that not all players support "
"Only enable this option if your player actually support this, otherwise you may "
"experience audio glitches during transitioning between tracks.",
default_value=False,
- category="advanced",
+ category="audio",
+ advanced=True,
requires_reload=True,
)
"the Music Assistant server, you may run into issues with streaming. "
"In that case always ensure that the players can reach the server on the network "
"and double check the base URL configuration of the Stream server in the settings.",
- category="advanced",
+ advanced=True,
default_value=[],
required=False,
multi_value=True,
ConfigValueOption("All interfaces", "all"),
],
default_value="default",
- category="advanced",
+ advanced=True,
requires_reload=True,
)
CONF_ENTRY_LIBRARY_SYNC_ALBUMS = ConfigEntry(
type=ConfigEntryType.BOOLEAN,
label="Hide this player in the user interface",
default_value=player.hidden_by_default,
- category="advanced",
+ category="generic",
+ advanced=True,
),
# add entry to expose player to HA
ConfigEntry(
label="Expose this player to Home Assistant",
description="Expose this player to the Home Assistant integration. \n"
"If disabled, this player will not be imported into Home Assistant.",
- category="advanced",
+ category="generic",
+ advanced=True,
default_value=player.expose_to_ha_by_default,
),
]
description="This will issue a full reset of the library "
"database and trigger a full sync. Only use this option as a last resort "
"if you are seeing issues with the library database.",
- category="advanced",
+ category="generic",
+ advanced=True,
),
)
if action == CONF_RESET_DB:
"\nMake sure that this IP can be reached by players on the local network, "
"otherwise audio streaming will not work.",
required=False,
- category="advanced",
+ category="generic",
+ advanced=True,
requires_reload=True,
),
ConfigEntry(
description="The TCP port to run the server. "
"Make sure that this server can be reached "
"on the given IP and TCP port by players on the local network.",
- category="advanced",
+ category="generic",
+ advanced=True,
requires_reload=True,
),
ConfigEntry(
"Use 0.0.0.0 to bind to all interfaces, which is the default. \n"
"This is an advanced setting that should normally "
"not be adjusted in regular setups.",
- category="advanced",
+ category="generic",
+ advanced=True,
required=False,
requires_reload=True,
),
description="Log level for the Smart Fades mixer and analyzer.",
options=CONF_ENTRY_LOG_LEVEL.options,
default_value="GLOBAL",
- category="advanced",
+ category="generic",
+ advanced=True,
),
CONF_ENTRY_ZEROCONF_INTERFACES,
)
"protect outside access to the webinterface and API. \n\n"
"This is an advanced setting that should normally "
"not be adjusted in regular setups.",
- category="advanced",
+ category="generic",
+ advanced=True,
requires_reload=True,
),
)
"will only work with AirPlay version 2, "
"while older devices may only support RAOP.\n\n"
"In most cases the default automatic selection will work fine.",
- category="airplay",
options=[
ConfigValueOption("Automatically select", 0),
ConfigValueOption("Prefer AirPlay 1 (RAOP)", StreamingProtocol.RAOP.value),
label="Enable encryption",
description="Enable encrypted communication with the player, "
"some (3rd party) players require this to be disabled.",
- category="airplay",
depends_on=CONF_AIRPLAY_PROTOCOL,
depends_on_value=StreamingProtocol.RAOP.value,
hidden=self.protocol != StreamingProtocol.RAOP,
+ advanced=True,
),
ConfigEntry(
key=CONF_ALAC_ENCODE,
label="Enable compression",
description="Save some network bandwidth by sending the audio as "
"(lossless) ALAC at the cost of a bit of CPU.",
- category="airplay",
depends_on=CONF_AIRPLAY_PROTOCOL,
depends_on_value=StreamingProtocol.RAOP.value,
hidden=self.protocol != StreamingProtocol.RAOP,
+ advanced=True,
),
CONF_ENTRY_SYNC_ADJUST,
ConfigEntry(
required=False,
label="Device password",
description="Some devices require a password to connect/play.",
- category="airplay",
+ advanced=True,
),
# airplay has fixed sample rate/bit depth so make this config entry static and hidden
create_sample_rates_config_entry(
depends_on=CONF_AIRPLAY_PROTOCOL,
depends_on_value=StreamingProtocol.RAOP.value,
hidden=self.protocol != StreamingProtocol.RAOP,
+ advanced=True,
),
]
type=ConfigEntryType.SECURE_STRING,
label="Manual Music User Token",
required=False,
- category="advanced",
+ advanced=True,
description=(
"Authenticate with a manual Music User Token in case the Authentication flow"
" is unsupported (e.g. when using child accounts)."
label="Verify SSL",
required=False,
description="Whether or not to verify the certificate of SSL/TLS connections.",
- category="advanced",
+ advanced=True,
default_value=True,
),
ConfigEntry(
label="Hide empty podcasts.",
required=False,
description="This will skip podcasts with no episodes associated.",
- category="advanced",
+ advanced=True,
default_value=False,
),
)
)
from bandcamp_async_api.models import CollectionType
from music_assistant_models.config_entries import ConfigEntry, ConfigValueType, ProviderConfig
-from music_assistant_models.enums import (
- ConfigEntryType,
- MediaType,
- ProviderFeature,
- StreamType,
-)
-from music_assistant_models.errors import (
- InvalidDataError,
- LoginFailed,
- MediaNotFoundError,
-)
-from music_assistant_models.media_items import (
- Album,
- Artist,
- AudioFormat,
- SearchResults,
- Track,
-)
+from music_assistant_models.enums import ConfigEntryType, MediaType, ProviderFeature, StreamType
+from music_assistant_models.errors import InvalidDataError, LoginFailed, MediaNotFoundError
+from music_assistant_models.media_items import Album, Artist, AudioFormat, SearchResults, Track
from music_assistant_models.provider import ProviderManifest
from music_assistant_models.streamdetails import StreamDetails
description="Search limit while getting artist top tracks.",
value=values.get(CONF_TOP_TRACKS_LIMIT) if values else DEFAULT_TOP_TRACKS_LIMIT,
default_value=DEFAULT_TOP_TRACKS_LIMIT,
- category="advanced",
+ advanced=True,
),
)
),
ConfigEntry(
key=_Constants.CONF_SHOW_LOCAL,
- category="advanced",
+ advanced=True,
type=ConfigEntryType.BOOLEAN,
label="Show local radio stations?",
default_value=False,
),
ConfigEntry(
key=_Constants.CONF_STREAM_FORMAT,
- category="advanced",
+ advanced=True,
label="Preferred stream format",
type=ConfigEntryType.STRING,
options=[
"better metadata and future expansion. \\n\\n"
"If you want to use the official Google Cast Receiver app instead, disable this option, "
"for example if your device has issues with the Music Assistant app.",
- category="advanced",
+ advanced=True,
),
)
type=ConfigEntryType.STRING,
label="SMB Version",
required=False,
- category="advanced",
+ advanced=True,
default_value="3.0",
options=[
ConfigValueOption("Auto", ""),
type=ConfigEntryType.STRING,
label="Cache Mode",
required=False,
- category="advanced",
+ advanced=True,
default_value="loose",
options=[
ConfigValueOption("Strict", "strict"),
default_value="2323",
label="Port to use to connect to the Fully Kiosk API (default is 2323).",
required=True,
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_USE_SSL,
type=ConfigEntryType.BOOLEAN,
label="Use HTTPS when connecting to the Fully Kiosk API.",
default_value=False,
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_VERIFY_SSL,
label="Verify HTTPS certificates (recommended).",
default_value=True,
description="Disabling verification trusts any certificate (no validation).",
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_SSL_FINGERPRINT,
"match the device certificate and overrides the verify setting."
),
required=False,
- category="advanced",
+ advanced=True,
),
)
label="Verify SSL",
required=False,
description="Whether or not to verify the certificate of SSL/TLS connections.",
- category="advanced",
+ advanced=True,
default_value=True,
value=values.get(CONF_VERIFY_SSL),
),
"'authenticate' button to generate a token for you with logging in.",
depends_on=CONF_URL,
value=cast("str", values.get(CONF_AUTH_TOKEN)) if values else None,
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_VERIFY_SSL,
label="Verify SSL",
required=False,
description="Whether or not to verify the certificate of SSL/TLS connections.",
- category="advanced",
+ advanced=True,
default_value=True,
),
)
label="Verify SSL",
required=False,
description="Whether or not to verify the certificate of SSL/TLS connections.",
- category="advanced",
+ advanced=True,
default_value=True,
),
)
"request. Smaller will require more requests but is better for low bandwidth "
"connections. The Open Subsonic spec says the max value for this is 500 items.",
default_value=200,
- category="advanced",
+ advanced=True,
),
)
"Privates use explicit URLs from bundle.json."
),
value=values.get(CONF_STREAM_PROTO),
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_STREAM_QUALITY,
default_value="qxa",
description="For ORF HLS: q1a/q2a/q3a/q4a/qxa. For shoutcast: q1a/q2a.",
value=values.get(CONF_STREAM_QUALITY),
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_INCLUDE_HIDDEN,
default_value=False,
description="Include stations with hideFromStations=true.",
value=values.get(CONF_INCLUDE_HIDDEN),
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_CATCHUP_PROTO,
required=True,
default_value=True,
depends_on=CONF_LOCAL_SERVER_SSL,
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_AUTH_TOKEN,
label="Import Collections",
description="Import collections (tracks, albums, or artists) as playlists",
default_value=False,
- category="advanced",
+ advanced=True,
)
)
entries.append(
description="Prefix to add to collection names when imported as playlists",
default_value="Collection: ",
depends_on=CONF_IMPORT_COLLECTIONS,
- category="advanced",
+ advanced=True,
)
)
label="Items per hub",
description="Maximum number of items to load from each hub (default: 10)",
default_value=10,
- category="advanced",
+ advanced=True,
range=(1, 100),
)
)
"of Media Assistant (ID: 782875). If you sideloaded the App on your Roku "
"this will need to be set to (ID: dev).",
required=False,
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_AUTO_DISCOVER,
label="Allow automatic Roku discovery",
default_value=True,
description="Enable automatic discovery of Roku players.",
- category="advanced",
+ advanced=True,
),
)
from music_assistant.mass import MusicAssistant
from music_assistant.models import ProviderInstanceType
from music_assistant.providers.snapcast.constants import (
- CONF_CATEGORY_ADVANCED,
CONF_CATEGORY_BUILT_IN,
- CONF_CATEGORY_GENERIC,
CONF_HELP_LINK,
CONF_SERVER_BUFFER_SIZE,
CONF_SERVER_CHUNK_MS,
default_value=not local_snapserver_present,
label="Use existing Snapserver",
required=False,
- category=(
- CONF_CATEGORY_ADVANCED if local_snapserver_present else CONF_CATEGORY_GENERIC
- ),
+ advanced=local_snapserver_present,
),
ConfigEntry(
key=CONF_SERVER_HOST,
label="Snapcast server ip",
required=False,
depends_on=CONF_USE_EXTERNAL_SERVER,
- category=(
- CONF_CATEGORY_ADVANCED if local_snapserver_present else CONF_CATEGORY_GENERIC
- ),
+ advanced=local_snapserver_present,
),
ConfigEntry(
key=CONF_SERVER_CONTROL_PORT,
label="Snapcast control port",
required=False,
depends_on=CONF_USE_EXTERNAL_SERVER,
- category=(
- CONF_CATEGORY_ADVANCED if local_snapserver_present else CONF_CATEGORY_GENERIC
- ),
+ advanced=local_snapserver_present,
),
ConfigEntry(
key=CONF_STREAM_IDLE_THRESHOLD,
default_value=DEFAULT_SNAPSTREAM_IDLE_THRESHOLD,
label="Snapcast idle threshold stream parameter",
required=True,
- category=CONF_CATEGORY_ADVANCED,
+ advanced=local_snapserver_present,
),
)
CONF_CATEGORY_GENERIC = "generic"
-CONF_CATEGORY_ADVANCED = "advanced"
CONF_CATEGORY_BUILT_IN = "Built-in Snapserver Settings"
CONF_HELP_LINK = (
return (
ConfigEntry(
key=CONF_QUALITY,
- category="advanced",
+ advanced=True,
type=ConfigEntryType.STRING,
label="Stream Quality",
options=[
label="Household ID",
default_value=household_ids[0] if household_ids else None,
description="Household ID for the Sonos (S1) system. Will be auto detected if empty.",
- category="advanced",
+ advanced=True,
required=False,
),
)
"player compatibility, so security risks are minimized to practically zero."
"You may safely disable this option if you have no players that rely on this feature "
"or you dont care about the additional metadata.",
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_CLI_JSON_PORT,
"it on a different port. Set to 0 to disable this functionality.\n\n"
"You may safely disable this option if you have no players that rely on this feature "
"or you dont care about the additional metadata.",
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_DISCOVERY,
"discover and connect to this server. \n\n"
"You may want to disable this feature if you are running multiple slimproto servers "
"on your network and/or you don't want clients to auto connect to this server.",
- category="advanced",
+ advanced=True,
),
ConfigEntry(
key=CONF_PORT,
required=False,
label="Enable display support",
description="Enable/disable native display support on squeezebox or squeezelite32 hardware.",
- category="advanced",
+ advanced=True,
)
CONF_ENTRY_VISUALIZATION = ConfigEntry(
key=CONF_VISUALIZATION,
label="Visualization type",
description="The type of visualization to show on the display "
"during playback if the device supports this.",
- category="advanced",
+ advanced=True,
depends_on=CONF_DISPLAY,
)
from aiovban.asyncio.util import BackPressureStrategy
from aiovban.enums import VBANSampleRate
from music_assistant_models.config_entries import ConfigEntry, ConfigValueOption
-from music_assistant_models.enums import (
- ConfigEntryType,
- ContentType,
- ProviderFeature,
- StreamType,
-)
+from music_assistant_models.enums import ConfigEntryType, ContentType, ProviderFeature, StreamType
from music_assistant_models.errors import SetupFailedError
from music_assistant_models.media_items import AudioFormat
from music_assistant_models.streamdetails import StreamMetadata
-from music_assistant.constants import (
- CONF_BIND_IP,
- CONF_BIND_PORT,
- CONF_ENTRY_WARN_PREVIEW,
-)
-from music_assistant.helpers.util import (
- get_ip_addresses,
-)
+from music_assistant.constants import CONF_BIND_IP, CONF_BIND_PORT, CONF_ENTRY_WARN_PREVIEW
+from music_assistant.helpers.util import get_ip_addresses
from music_assistant.models.plugin import PluginProvider, PluginSource
from .vban import AsyncVBANClientMod
"Use 0.0.0.0 to bind to all interfaces, which is the default. \n"
"This is an advanced setting that should normally "
"not be adjusted in regular setups.",
- category="advanced",
+ advanced=True,
required=True,
),
ConfigEntry(
options=[ConfigValueOption(x, x) for x in VBAN_QUEUE_STRATEGIES],
label="Receiver: VBAN queue strategy",
description="What should happen if the receiving queue fills up?",
- category="advanced",
+ advanced=True,
required=True,
),
ConfigEntry(
label="Receiver: VBAN packets queue size",
description="This can be increased if MA is running on a very low power device, "
"otherwise this should not need to be changed.",
- category="advanced",
+ advanced=True,
required=True,
),
)