diff --git a/server/src/plugins/service-store/migrations.ts b/server/src/plugins/service-store/migrations.ts index c4aac33..283fb11 100644 --- a/server/src/plugins/service-store/migrations.ts +++ b/server/src/plugins/service-store/migrations.ts @@ -867,18 +867,4 @@ export const MIGRATIONS: readonly MigrationEntry[] = [ addColumnIfNotExists(db, "displays", "actual_power_state_at", "TEXT"); }, - // Backfill any camera type with a direct RTSP URL. Earlier backfill only - // covered type=rtsp, but ONVIF imports can also retain rtsp_url. - (db: DatabaseSync) => { - db.exec(` - INSERT INTO camera_streams (camera_id, role, name, rtsp_uri, is_discovered) - SELECT c.id, 'main', 'Main', c.rtsp_url, 0 - FROM cameras c - WHERE c.rtsp_url IS NOT NULL - AND c.rtsp_url != '' - AND NOT EXISTS ( - SELECT 1 FROM camera_streams s WHERE s.camera_id = c.id - ) - `); - }, ]; diff --git a/server/src/shared/bundle.ts b/server/src/shared/bundle.ts index cb9cec6..c65a59f 100644 --- a/server/src/shared/bundle.ts +++ b/server/src/shared/bundle.ts @@ -209,7 +209,7 @@ export function generateBundle( const bundleCameras: BundleCamera[] = cameras.map((cam) => { const streams = repo.listCameraStreams(cam.id); const effectiveStreams = streams.length > 0 ? streams : ( - cam.rtsp_url + cam.type === "rtsp" && cam.rtsp_url ? [{ id: 0, role: "main" as const,