skip clips which are over day length, mark clips which are behind day length, #201
update packages
This commit is contained in:
parent
535624d81b
commit
269d3f0306
@ -1,4 +1,9 @@
|
||||
export default {
|
||||
server: {
|
||||
port: 3000, // default: 3000
|
||||
host: '127.0.0.1' // default: localhost
|
||||
},
|
||||
|
||||
ssr: false,
|
||||
/*
|
||||
** Headers of the page
|
||||
|
13713
package-lock.json
generated
13713
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ffplayout-frontend",
|
||||
"version": "5.3.0",
|
||||
"version": "5.3.1",
|
||||
"description": "Web GUI for ffplayout",
|
||||
"author": "Jonathan Baecker",
|
||||
"private": true,
|
||||
@ -16,7 +16,7 @@
|
||||
"@nuxtjs/dayjs": "^1.4.1",
|
||||
"@nuxtjs/dotenv": "^1.4.1",
|
||||
"bootstrap": "^4.6.2",
|
||||
"bootstrap-vue": "^2.22.0",
|
||||
"bootstrap-vue": "^2.23.1",
|
||||
"cookie-universal-nuxt": "^2.2.2",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"lodash": "^4.17.21",
|
||||
@ -35,7 +35,7 @@
|
||||
"@nuxtjs/style-resources": "^1.2.1",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-nuxt": "3.2.0",
|
||||
"sass": "^1.55.0",
|
||||
"sass": "^1.56.1",
|
||||
"sass-loader": "^10.3.1"
|
||||
}
|
||||
}
|
||||
|
@ -259,13 +259,13 @@
|
||||
:id="`clip_${index}`"
|
||||
:key="item.key"
|
||||
class="playlist-item"
|
||||
:class="index === currentClipIndex ? 'active-playlist-clip' : ''"
|
||||
:class="index === currentClipIndex ? 'active-playlist-clip' : item.class"
|
||||
>
|
||||
<b-row class="playlist-row">
|
||||
<b-col v-if="configPlayout.playlist.day_start" cols="1" class="timecode">
|
||||
{{ item.begin | secondsToTime }}
|
||||
</b-col>
|
||||
<b-col class="grabbing filename">
|
||||
<b-col class="grabbing filename" :title="item.class === 'overLength' ? 'Clip exceeds the length of the day!' : ''">
|
||||
{{ item.source | filename }}
|
||||
</b-col>
|
||||
<b-col cols="1" class="text-center playlist-input">
|
||||
@ -509,7 +509,7 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState('config', ['configID', 'configGui', 'configPlayout', 'utcOffset', 'startInSec']),
|
||||
...mapState('config', ['configID', 'configGui', 'configPlayout', 'utcOffset', 'startInSec', 'playlistLength']),
|
||||
...mapState('media', ['crumbs', 'folderTree']),
|
||||
...mapState('playlist', [
|
||||
'timeStr', 'timeLeft', 'currentClip', 'progressValue', 'currentClipIndex',
|
||||
@ -519,7 +519,7 @@ export default {
|
||||
return this.$store.state.playlist.playlist
|
||||
},
|
||||
set (list) {
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, list))
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlistLength, list, false))
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -697,14 +697,14 @@ export default {
|
||||
this.playlist[index].out = sec
|
||||
}
|
||||
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlist))
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlistLength, this.playlist, false))
|
||||
}
|
||||
},
|
||||
|
||||
removeItemFromPlaylist (index) {
|
||||
this.playlist.splice(index, 1)
|
||||
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlist))
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlistLength, this.playlist, false))
|
||||
},
|
||||
|
||||
async resetPlaylist () {
|
||||
@ -766,7 +766,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, tempList))
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlistLength, tempList, false))
|
||||
},
|
||||
|
||||
async generatePlaylist (listDate) {
|
||||
@ -780,14 +780,14 @@ export default {
|
||||
this.$store.commit('UPDATE_VARIANT', 'success')
|
||||
this.$store.commit('UPDATE_SHOW_ERROR_ALERT', true)
|
||||
this.$store.commit('UPDATE_ERROR_ALERT_MESSAGE', 'Generate Playlist done...')
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, generate.data.program))
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlistLength, generate.data.program, false))
|
||||
|
||||
setTimeout(() => { this.$store.commit('UPDATE_SHOW_ERROR_ALERT', false) }, 2000)
|
||||
}
|
||||
},
|
||||
|
||||
async savePlaylist (saveDate) {
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlist))
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlistLength, this.playlist, true))
|
||||
const saveList = this.playlist.map(({ begin, ...item }) => item)
|
||||
|
||||
const postSave = await this.$axios.post(
|
||||
@ -848,7 +848,7 @@ export default {
|
||||
if (this.editId === undefined) {
|
||||
const list = this.playlist
|
||||
list.push(this.newSource)
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, list))
|
||||
this.$store.commit('playlist/UPDATE_PLAYLIST', this.$processPlaylist(this.startInSec, this.playlistLength, list, false))
|
||||
} else {
|
||||
this.playlist[this.editId] = this.newSource
|
||||
this.editId = undefined
|
||||
@ -1181,6 +1181,10 @@ export default {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.overLength {
|
||||
background-color: #ed890641 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
@ -1,10 +1,11 @@
|
||||
export default ({ app }, inject) => {
|
||||
inject('processPlaylist', (dayStart, list) => {
|
||||
inject('processPlaylist', (dayStart, length, list, forSave) => {
|
||||
if (!dayStart) {
|
||||
dayStart = 0
|
||||
}
|
||||
|
||||
let begin = dayStart
|
||||
const newList = []
|
||||
|
||||
for (const item of list) {
|
||||
item.begin = begin
|
||||
@ -21,9 +22,24 @@ export default ({ app }, inject) => {
|
||||
delete item.custom_filter
|
||||
}
|
||||
|
||||
if (begin + (item.out - item.in) > length + dayStart) {
|
||||
item.class = 'overLength'
|
||||
|
||||
if (forSave) {
|
||||
item.out = (length + dayStart) - begin
|
||||
}
|
||||
}
|
||||
|
||||
if (forSave && begin >= length + dayStart) {
|
||||
break
|
||||
}
|
||||
|
||||
newList.push(item)
|
||||
|
||||
begin += (item.out - item.in)
|
||||
}
|
||||
return list
|
||||
|
||||
return newList
|
||||
})
|
||||
|
||||
// convert time (00:00:00) string to seconds
|
||||
|
@ -63,7 +63,7 @@ export const actions = {
|
||||
const response = await this.$axios.get(`api/playlist/${channel}?date=${date}`)
|
||||
|
||||
if (response.data && response.data.program) {
|
||||
commit('UPDATE_PLAYLIST', this.$processPlaylist(rootState.config.startInSec, response.data.program))
|
||||
commit('UPDATE_PLAYLIST', this.$processPlaylist(rootState.config.startInSec, rootState.config.playlistLength, response.data.program, false))
|
||||
|
||||
if (date === dateToday) {
|
||||
commit('UPDATE_TODAYS_PLAYLIST', _.cloneDeep(response.data.program))
|
||||
|
Loading…
x
Reference in New Issue
Block a user