diff --git a/components/ConfigPlayout.vue b/components/ConfigPlayout.vue index db3a4ada..ecc4811a 100644 --- a/components/ConfigPlayout.vue +++ b/components/ConfigPlayout.vue @@ -165,6 +165,7 @@ function setHelp(key: string, text: string): string { async function onSubmitPlayout() { const update = await configStore.setPlayoutConfig(configStore.playout) + configStore.onetimeInfo = true if (update.status === 200) { indexStore.msgAlert('success', 'Update playout config success!', 2) diff --git a/components/MediaBrowser.vue b/components/MediaBrowser.vue index 1b4ae1f5..188af30e 100644 --- a/components/MediaBrowser.vue +++ b/components/MediaBrowser.vue @@ -43,9 +43,9 @@ :id="`file-${index}`" :key="element.name" class="w-full border-b border-t border-base-content/20" - :class="{ 'grabbing cursor-grab': width > 768 }" + :class="{ 'grabbing cursor-grab': width > 768 && configStore.playout.processing.mode === 'playlist' }" > - + @@ -77,6 +77,7 @@ const { width } = useWindowSize({ initialWidth: 800 }) const { secToHMS, mediaType } = stringFormatter() +const configStore = useConfig() const mediaStore = useMedia() const { configID } = storeToRefs(useConfig()) diff --git a/components/PlaylistTable.vue b/components/PlaylistTable.vue index 18423d73..9631496f 100644 --- a/components/PlaylistTable.vue +++ b/components/PlaylistTable.vue @@ -10,7 +10,7 @@ - + @@ -189,7 +191,8 @@ function classSwitcher() { if ( configStore.playout.playlist.startInSec + configStore.playout.playlist.lengthInSec > - lastItem.begin + lastItem.out - lastItem.in + lastItem.begin + lastItem.out - lastItem.in || + configStore.playout.playlist.infinit ) { sortContainer.value?.sortable.el.classList.add('add-space') } else { @@ -307,6 +310,10 @@ function deletePlaylistItem(index: number) { position: absolute; } +#sort-container .timeHidden { + display: none !important; +} + /* format dragging element */ diff --git a/composables/helper.ts b/composables/helper.ts index 22971e2a..55870e0b 100644 --- a/composables/helper.ts +++ b/composables/helper.ts @@ -111,7 +111,7 @@ export const stringFormatter = () => { } function secondsToTime(sec: number) { - return new Date(sec * 1000).toISOString().substring(11, 19) + return new Date(sec * 1000 || 0).toISOString().substring(11, 19) } function mediaType(path: string) { @@ -153,13 +153,13 @@ export const stringFormatter = () => { const ext = path.split('.').pop() if (ext) { - if (liveType.includes(ext)) { + if (liveType.includes(ext.toLowerCase())) { return 'live' - } else if (videoType.includes(ext)) { + } else if (videoType.includes(ext.toLowerCase())) { return 'video' - } else if (audioType.includes(ext)) { + } else if (audioType.includes(ext.toLowerCase())) { return 'audio' - } else if (imageType.includes(ext)) { + } else if (imageType.includes(ext.toLowerCase())) { return 'image' } } diff --git a/lang/de-DE.js b/lang/de-DE.js index a1ee5af7..b0f356bc 100644 --- a/lang/de-DE.js +++ b/lang/de-DE.js @@ -85,6 +85,7 @@ export default { shift: 'Zeitverschiebung', all: 'Alle', addBlock: 'Zeitblock hinzufügen', + infinitInfo: 'Die Wiedergabe läuft im unendlichen Modus. Es sind keine zeitbasierten Informationen möglich.', }, media: { notExists: 'Speicher existiert nicht!', diff --git a/lang/en-US.js b/lang/en-US.js index ae8c2a84..72e680b8 100644 --- a/lang/en-US.js +++ b/lang/en-US.js @@ -85,6 +85,7 @@ export default { shift: 'Shift', all: 'All', addBlock: 'Add time block', + infinitInfo: 'Playout runs in infinite mode. No time based information is possible.', }, media: { notExists: 'Storage not exist!', diff --git a/lang/pt-BR.js b/lang/pt-BR.js index dd97f646..85fea8f4 100644 --- a/lang/pt-BR.js +++ b/lang/pt-BR.js @@ -85,6 +85,7 @@ export default { shift: 'Diferença horária', all: 'Todos', addBlock: 'Adicionar bloco de tempo', + infinitInfo: 'O playout é executado no modo infinito. Nenhuma informação baseada em tempo é possível', }, media: { notExists: 'O armazenamento não existe!', diff --git a/lang/ru-RU.js b/lang/ru-RU.js index dccd6327..30233179 100644 --- a/lang/ru-RU.js +++ b/lang/ru-RU.js @@ -85,6 +85,7 @@ export default { shift: 'Перемотка', all: 'Все', addBlock: 'Добавить время начало передачи', + infinitInfo: 'Воспроизведение работает в бесконечном режиме. Никакая информация, основанная на времени, невозможна.', }, media: { notExists: 'Папки не существует!', diff --git a/package.json b/package.json index 6f230db6..31690df8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ffplayout-frontend", - "version": "0.9.2", + "version": "0.9.3", "description": "Web GUI for ffplayout", "author": "Jonathan Baecker", "private": true, diff --git a/pages/player.vue b/pages/player.vue index f2064551..dd7a2410 100644 --- a/pages/player.vue +++ b/pages/player.vue @@ -2,8 +2,9 @@
-
+
- + +
+ +
-
+
@@ -259,6 +266,13 @@ const newSource = ref({ uid: '', } as PlaylistItem) +onMounted(() => { + if (configStore.onetimeInfo && configStore.playout.playlist.infinit) { + indexStore.msgAlert('warning', t('player.infinitInfo'), 7) + configStore.onetimeInfo = false + } +}) + const calendarFormat = (date: Date) => { return $dayjs(date).locale(locale.value).format('dddd - LL') } diff --git a/stores/config.ts b/stores/config.ts index 6daca3e7..467badd6 100644 --- a/stores/config.ts +++ b/stores/config.ts @@ -13,6 +13,7 @@ export const useConfig = defineStore('config', { currentUser: '', configUser: {} as User, utcOffset: 0, + onetimeInfo: true, }), getters: {}, diff --git a/stores/playlist.ts b/stores/playlist.ts index 556a9a3a..205a821d 100644 --- a/stores/playlist.ts +++ b/stores/playlist.ts @@ -54,7 +54,7 @@ export const usePlaylist = defineStore('playlist', { if ( this.playlist.length > 0 && programData.length > 0 && - this.playlist[0].date === date && + (this.playlist[0].date === date || configStore.playout.playlist.infinit) && $_.differenceWith(this.playlist, programData, (a, b) => { return $_.isEqual($_.omit(a, ['uid']), $_.omit(b, ['uid'])) }).length > 0
+
{{ $t('player.start') }}
@@ -80,7 +80,9 @@ '!bg-amber-600/40': element.overtime, }" > -
{{ secondsToTime(element.begin) }} + {{ secondsToTime(element.begin) }} + {{ element.title || filename(element.source) }}