[sendspin] Fix codec enum codegen when codecs is not set (#19055)

This commit is contained in:
Remco van Essen
2026-09-14 13:12:25 +12:00
committed by Jesse Hills
parent 69f2a7d556
commit ccec6e72bf
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -307,7 +307,7 @@ async def to_code(config: ConfigType) -> None:
player_cfg = data.player_config
sample_rate = player_cfg[CONF_SAMPLE_RATE]
codecs = player_cfg[CONF_CODECS]
codecs = [CODECS[codec] for codec in player_cfg[CONF_CODECS]]
def _audio_format(codec: MockObj, channels: int) -> cg.StructInitializer:
return cg.StructInitializer(
@@ -9,4 +9,3 @@ media_source:
static_delay_adjustable: true
fixed_delay: 480us
decode_memory: internal
codecs: [pcm, opus, flac]