diff --git a/components/PlayerControl.vue b/components/PlayerControl.vue index 31247a6c..417cef05 100644 --- a/components/PlayerControl.vue +++ b/components/PlayerControl.vue @@ -271,6 +271,7 @@ watch([data], () => { playlistStore.setStatus(playout_status) } catch { indexStore.sseConnected = true + playlistStore.playoutIsRunning = false resetStatus() } } diff --git a/components/PlaylistTable.vue b/components/PlaylistTable.vue index 78b58892..359906db 100644 --- a/components/PlaylistTable.vue +++ b/components/PlaylistTable.vue @@ -140,7 +140,7 @@ const playlistContainer = ref() const sortContainer = ref() const todayDate = ref($dayjs().utcOffset(configStore.utcOffset).format('YYYY-MM-DD')) const { id } = storeToRefs(useConfig()) -const { currentIndex, listDate } = storeToRefs(usePlaylist()) +const { currentIndex, listDate, playoutIsRunning } = storeToRefs(usePlaylist()) const playlistSortOptions = { group: 'playlist', @@ -175,6 +175,12 @@ watch([listDate, id], () => { }, 800) }) +watch([playoutIsRunning], () => { + setTimeout(() => { + scrollTo(currentIndex.value) + }, 400) +}) + defineExpose({ classSwitcher, getPlaylist,