work on multi channel
This commit is contained in:
parent
6f7cac4c53
commit
0068027218
@ -297,12 +297,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState('config', ['configGui', 'configPlayout']),
|
...mapState('config', ['configID', 'configGui', 'configPlayout']),
|
||||||
...mapState('media', ['crumbs', 'folderTree'])
|
...mapState('media', ['crumbs', 'folderTree'])
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created () {
|
||||||
this.extensions = [...this.configPlayout.storage.extensions, ...this.configGui.extra_extensions].join(',')
|
this.extensions = [...this.configPlayout.storage.extensions, ...this.configGui[this.configID].extra_extensions].join(',')
|
||||||
this.getPath(this.extensions, '')
|
this.getPath(this.extensions, '')
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -354,7 +354,11 @@ export default {
|
|||||||
|
|
||||||
await this.$axios.post(
|
await this.$axios.post(
|
||||||
'api/player/media/op/',
|
'api/player/media/op/',
|
||||||
{ folder: this.folderName, path: this.crumbs.map(e => e.text).join('/') }
|
{
|
||||||
|
folder: this.folderName,
|
||||||
|
path: this.crumbs.map(e => e.text).join('/'),
|
||||||
|
config_path: this.configGui[this.configID].playout_config
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
this.$root.$emit('bv::hide::modal', 'folder-modal')
|
this.$root.$emit('bv::hide::modal', 'folder-modal')
|
||||||
@ -389,6 +393,8 @@ export default {
|
|||||||
this.currentProgress = progress
|
this.currentProgress = progress
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const configPath = this.configGui[this.configID].playout_config
|
||||||
|
|
||||||
for (const [i, file] of this.inputFiles.entries()) {
|
for (const [i, file] of this.inputFiles.entries()) {
|
||||||
this.uploadTask = file.name
|
this.uploadTask = file.name
|
||||||
|
|
||||||
@ -399,7 +405,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await this.$axios.put(
|
await this.$axios.put(
|
||||||
`api/player/media/upload/${encodeURIComponent(file.name)}?path=${encodeURIComponent(this.crumbs.map(e => e.text).join('/'))}`,
|
`api/player/media/upload/${encodeURIComponent(file.name)}?path=${encodeURIComponent(this.crumbs.map(e => e.text).join('/'))}&config_path=${configPath}`,
|
||||||
file,
|
file,
|
||||||
config
|
config
|
||||||
)
|
)
|
||||||
|
@ -17,10 +17,12 @@ export const mutations = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
async getTree ({ commit, dispatch, state }, { extensions, path }) {
|
async getTree ({ commit, dispatch, state, rootState }, { extensions, path }) {
|
||||||
const crumbs = []
|
const crumbs = []
|
||||||
let root = '/'
|
let root = '/'
|
||||||
const response = await this.$axios.get(`api/player/media/?extensions=${extensions}&path=${path}`)
|
const configPath = rootState.config.configGui[rootState.config.configID].playout_config
|
||||||
|
const response = await this.$axios.get(
|
||||||
|
`api/player/media/?extensions=${extensions}&config_path=${configPath}&path=${path}`)
|
||||||
|
|
||||||
if (response.data.tree) {
|
if (response.data.tree) {
|
||||||
const pathArr = response.data.tree[0].split('/')
|
const pathArr = response.data.tree[0].split('/')
|
||||||
|
@ -49,7 +49,7 @@ export const mutations = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
async getPlaylist ({ commit, dispatch, state, rootState }, { dayStart, date }) {
|
async getPlaylist ({ commit, dispatch, state, rootState }, { dayStart, date, configPath }) {
|
||||||
const timeInSec = this.$timeToSeconds(this.$dayjs().format('HH:mm:ss'))
|
const timeInSec = this.$timeToSeconds(this.$dayjs().format('HH:mm:ss'))
|
||||||
let dateToday = this.$dayjs().format('YYYY-MM-DD')
|
let dateToday = this.$dayjs().format('YYYY-MM-DD')
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ export const actions = {
|
|||||||
dateToday = this.$dayjs(dateToday).subtract(1, 'day').format('YYYY-MM-DD')
|
dateToday = this.$dayjs(dateToday).subtract(1, 'day').format('YYYY-MM-DD')
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await this.$axios.get(`api/player/playlist/?date=${date}`)
|
const response = await this.$axios.get(`api/player/playlist/?date=${date}&config_path=${configPath}`)
|
||||||
|
|
||||||
if (response.data && response.data.program) {
|
if (response.data && response.data.program) {
|
||||||
commit('UPDATE_PLAYLIST', this.$processPlaylist(dayStart, response.data.program))
|
commit('UPDATE_PLAYLIST', this.$processPlaylist(dayStart, response.data.program))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user