small fix
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 6 Dec 2023 22:45:33 +0000 (23:45 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Wed, 6 Dec 2023 22:45:33 +0000 (23:45 +0100)
music_assistant/server/controllers/music.py
music_assistant/server/providers/sonos/__init__.py

index 34f5e1196eb3a83b5cbd2f7736f1ed1c0c563dea..972167d521ca51a89d0aa79b5713de6dec5ce052 100755 (executable)
@@ -4,6 +4,7 @@ from __future__ import annotations
 import asyncio
 import os
 import shutil
+import sqlite3
 import statistics
 from collections.abc import AsyncGenerator
 from contextlib import suppress
@@ -707,11 +708,12 @@ class MusicController(CoreController):
                     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
index 687d20c7e15e4115fde67cb8b2200ff9cb72b223..207629164feafb4a056ffa4aad73154a30852239 100644 (file)
@@ -471,7 +471,7 @@ class SonosPlayerProvider(PlayerProvider):
                 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,