From e15546af97d188f52efb5441c7dd764b50ce86ac Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 6 Dec 2023 23:45:33 +0100 Subject: [PATCH] small fix --- music_assistant/server/controllers/music.py | 12 +++++++----- music_assistant/server/providers/sonos/__init__.py | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/music_assistant/server/controllers/music.py b/music_assistant/server/controllers/music.py index 34f5e1196..972167d52 100755 --- a/music_assistant/server/controllers/music.py +++ b/music_assistant/server/controllers/music.py @@ -4,6 +4,7 @@ import asyncio import os import shutil +import sqlite3 import statistics from collections.abc import AsyncGenerator from contextlib import suppress @@ -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 diff --git a/music_assistant/server/providers/sonos/__init__.py b/music_assistant/server/providers/sonos/__init__.py index 687d20c7e..207629164 100644 --- a/music_assistant/server/providers/sonos/__init__.py +++ b/music_assistant/server/providers/sonos/__init__.py @@ -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,