Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Dec 6, 2023
1 parent 4951951 commit e15546a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions music_assistant/server/controllers/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import asyncio
import os
import shutil
import sqlite3
import statistics
from collections.abc import AsyncGenerator
from contextlib import suppress
Expand Down Expand Up @@ -707,11 +708,12 @@ async def _setup_database(self):
DB_TABLE_RADIOS,
):
# create new external_ids column
await self.database.execute(
f"ALTER TABLE {table} "
"ADD COLUMN external_ids "
"json NOT NULL DEFAULT '[]'"
)
with suppress(sqlite3.OperationalError):
await self.database.execute(
f"ALTER TABLE {table} "
"ADD COLUMN external_ids "
"json NOT NULL DEFAULT '[]'"
)
# handle all other schema versions
else:
# we keep it simple and just recreate the tables
Expand Down
2 changes: 1 addition & 1 deletion music_assistant/server/providers/sonos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ async def _device_discovered(self, soco_device: soco.SoCo) -> None:
supported_features=PLAYER_FEATURES,
device_info=DeviceInfo(
model=speaker_info["model_name"],
address=speaker_info["mac_address"],
address=soco_device.ip_address,
manufacturer=self.name,
),
max_sample_rate=48000,
Expand Down

0 comments on commit e15546a

Please sign in to comment.