From 8dcb94d3aee9dfd5409dcbba7c0ed02798b7e1b3 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Sat, 11 Nov 2023 17:35:25 +0100 Subject: [PATCH] update comments --- src/components/player/atoms/settings/SourceSelectingView.tsx | 4 ++++ src/stores/volume/index.ts | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/player/atoms/settings/SourceSelectingView.tsx b/src/components/player/atoms/settings/SourceSelectingView.tsx index f7484ffb..1519618f 100644 --- a/src/components/player/atoms/settings/SourceSelectingView.tsx +++ b/src/components/player/atoms/settings/SourceSelectingView.tsx @@ -63,12 +63,15 @@ export function EmbedOption(props: { ); } +// TODO refactor this file: cleanup + reporting + export function EmbedSelectionView({ sourceId, id }: EmbedSelectionViewProps) { const router = useOverlayRouter(id); const meta = usePlayerStore((s) => s.meta); const setSource = usePlayerStore((s) => s.setSource); const setSourceId = usePlayerStore((s) => s.setSourceId); const progress = usePlayerStore((s) => s.progress.time); + const sourceName = useMemo(() => { if (!sourceId) return "..."; const sourceMeta = providers.getMetadata(sourceId); @@ -81,6 +84,7 @@ export function EmbedSelectionView({ sourceId, id }: EmbedSelectionViewProps) { id: sourceId, media: scrapeMedia, }); + if (result.stream) { setSource(convertRunoutputToSource({ stream: result.stream }), progress); setSourceId(sourceId); diff --git a/src/stores/volume/index.ts b/src/stores/volume/index.ts index fe753718..690adc1f 100644 --- a/src/stores/volume/index.ts +++ b/src/stores/volume/index.ts @@ -12,7 +12,6 @@ export interface EmpheralVolumeStore { setShowVolume(v: boolean): void; } -// TODO add migration from previous stored volume export const useVolumeStore = create( persist( immer((set) => ({