refactor: cast button (#25101)

This commit is contained in:
Jason Rasmussen
2026-01-06 18:51:19 -05:00
committed by GitHub
parent 1a24a2d35e
commit 1293e473ca
7 changed files with 42 additions and 34 deletions
+4 -1
View File
@@ -1,3 +1,4 @@
import { eventManager } from '$lib/managers/event-manager.svelte';
import { GCastDestination } from '$lib/utils/cast/gcast-destination.svelte';
import { createSession, type SessionCreateResponseDto } from '@immich/sdk';
import { DateTime, Duration } from 'luxon';
@@ -57,9 +58,11 @@ class CastManager {
new GCastDestination(),
// Add other cast destinations here (ie FCast)
];
eventManager.on('AppInit', () => void this.initialize());
}
async initialize() {
private async initialize() {
// this goes first to prevent multiple calls to initialize
if (this.initialized) {
return;