From 4d38a74306113431d6b5db10738e0bb2b1a2cf75 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Thu, 22 Aug 2024 17:22:20 +0200 Subject: [PATCH] load config on channel save --- components/ConfigChannel.vue | 1 + components/MediaBrowser.vue | 4 +--- pages/logging.vue | 4 ++-- stores/config.ts | 3 +++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/ConfigChannel.vue b/components/ConfigChannel.vue index 413c7794..1f020fec 100644 --- a/components/ConfigChannel.vue +++ b/components/ConfigChannel.vue @@ -129,6 +129,7 @@ async function onSubmitChannel() { if (update.status) { indexStore.msgAlert('success', t('config.updateChannelSuccess'), 2) + await configStore.getPlayoutConfig() } else { indexStore.msgAlert('error', t('config.updateChannelFailed'), 2) } diff --git a/components/MediaBrowser.vue b/components/MediaBrowser.vue index 5fd6ac43..d845eb24 100644 --- a/components/MediaBrowser.vue +++ b/components/MediaBrowser.vue @@ -97,9 +97,7 @@ defineProps({ }) onMounted(() => { - if (!mediaStore.folderTree.parent) { - mediaStore.getTree('') - } + mediaStore.getTree('') }) watch([id], () => { diff --git a/pages/logging.vue b/pages/logging.vue index e595b688..c6c7d201 100644 --- a/pages/logging.vue +++ b/pages/logging.vue @@ -66,8 +66,8 @@ const severityLevels: { [key: string]: number } = { ERROR: 4, } -onMounted(() => { - getLog() +onMounted(async () => { + await getLog() }) watch([listDate, id], () => { diff --git a/stores/config.ts b/stores/config.ts index 6b95b7c2..37d4b873 100644 --- a/stores/config.ts +++ b/stores/config.ts @@ -84,6 +84,9 @@ export const useConfig = defineStore('config', { extra_extensions: '', name: 'Channel 1', preview_url: '', + hls_path: '', + playlist_path: '', + storage_path: '', uts_offset: 0, }, ]