import asyncio
import os
import shutil
+import sqlite3
import statistics
from collections.abc import AsyncGenerator
from contextlib import suppress
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
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,