fix path for playlist and preview, work on multi channel
This commit is contained in:
parent
3223df72d6
commit
6f7cac4c53
@ -152,7 +152,7 @@
|
|||||||
{{ file.file }}
|
{{ file.file }}
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1" class="browser-play-col">
|
<b-col cols="1" class="browser-play-col">
|
||||||
<b-link @click="showModal(`/${folderTree.tree[0]}/${file.file}`)">
|
<b-link @click="showPreviewModal(`/${folderTree.tree[0]}/${file.file}`)">
|
||||||
<b-icon-play-fill />
|
<b-icon-play-fill />
|
||||||
</b-link>
|
</b-link>
|
||||||
</b-col>
|
</b-col>
|
||||||
@ -168,7 +168,7 @@
|
|||||||
</pane>
|
</pane>
|
||||||
<pane>
|
<pane>
|
||||||
<div class="playlist-container">
|
<div class="playlist-container">
|
||||||
<b-list-group>
|
<b-list-group class="list-group-header">
|
||||||
<b-list-group-item>
|
<b-list-group-item>
|
||||||
<b-row class="playlist-row">
|
<b-row class="playlist-row">
|
||||||
<b-col cols="1" class="timecode">
|
<b-col cols="1" class="timecode">
|
||||||
@ -222,7 +222,7 @@
|
|||||||
{{ item.source | filename }}
|
{{ item.source | filename }}
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1" class="text-center playlist-input">
|
<b-col cols="1" class="text-center playlist-input">
|
||||||
<b-link @click="showModal(item.source)">
|
<b-link @click="showPreviewModal(item.source)">
|
||||||
<b-icon-play-fill />
|
<b-icon-play-fill />
|
||||||
</b-link>
|
</b-link>
|
||||||
</b-col>
|
</b-col>
|
||||||
@ -344,7 +344,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState('config', ['configGui', 'configPlayout']),
|
...mapState('config', ['configID', 'configGui', 'configPlayout']),
|
||||||
...mapState('media', ['crumbs', 'folderTree']),
|
...mapState('media', ['crumbs', 'folderTree']),
|
||||||
...mapState('playlist', ['timeStr', 'timeLeft', 'currentClip', 'progressValue', 'currentClipIndex', 'currentClipDuration', 'currentClipIn', 'currentClipOut']),
|
...mapState('playlist', ['timeStr', 'timeLeft', 'currentClip', 'progressValue', 'currentClipIndex', 'currentClipDuration', 'currentClipIn', 'currentClipOut']),
|
||||||
playlist: {
|
playlist: {
|
||||||
@ -419,23 +419,33 @@ export default {
|
|||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
},
|
},
|
||||||
async getStatus () {
|
async getStatus () {
|
||||||
const status = await this.$axios.post('api/player/system/', { run: 'status' })
|
const engine = this.configGui[this.configID].engine_service.split('/').slice(-1)[0].split('.')[0]
|
||||||
|
const status = await this.$axios.post('api/player/system/', { run: 'status', engine })
|
||||||
|
|
||||||
if (status.data.data && status.data.data === 'active') {
|
if (status.data.data && status.data.data === 'RUNNING') {
|
||||||
this.isPlaying = 'is-playing'
|
this.isPlaying = 'is-playing'
|
||||||
} else {
|
} else {
|
||||||
this.isPlaying = ''
|
this.isPlaying = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async playoutControl (state) {
|
async playoutControl (state) {
|
||||||
await this.$axios.post('api/player/system/', { run: state })
|
const engine = this.configGui[this.configID].engine_service.split('/').slice(-1)[0].split('.')[0]
|
||||||
|
await this.$axios.post('api/player/system/', { run: state, engine })
|
||||||
|
|
||||||
setTimeout(() => { this.getStatus() }, 1000)
|
setTimeout(() => { this.getStatus() }, 1000)
|
||||||
},
|
},
|
||||||
async getPlaylist () {
|
async getPlaylist () {
|
||||||
await this.$store.dispatch('playlist/getPlaylist', { dayStart: this.configPlayout.playlist.day_start, date: this.listDate })
|
await this.$store.dispatch('playlist/getPlaylist', {
|
||||||
|
dayStart: this.configPlayout.playlist.day_start,
|
||||||
|
date: this.listDate,
|
||||||
|
configPath: this.configGui[this.configID].playout_config
|
||||||
|
})
|
||||||
},
|
},
|
||||||
showModal (src) {
|
showPreviewModal (src) {
|
||||||
|
const storagePath = this.configPlayout.storage.path
|
||||||
|
const storagePathArr = storagePath.split('/')
|
||||||
|
const storageRoot = storagePathArr.pop()
|
||||||
|
src = '/' + src.substring(src.indexOf(storageRoot))
|
||||||
this.previewSource = src.split('/').slice(-1)[0]
|
this.previewSource = src.split('/').slice(-1)[0]
|
||||||
const ext = this.previewSource.split('.').slice(-1)[0]
|
const ext = this.previewSource.split('.').slice(-1)[0]
|
||||||
this.previewOptions = {
|
this.previewOptions = {
|
||||||
@ -454,15 +464,13 @@ export default {
|
|||||||
this.$root.$emit('bv::show::modal', 'preview-modal')
|
this.$root.$emit('bv::show::modal', 'preview-modal')
|
||||||
},
|
},
|
||||||
cloneClip ({ file, duration }) {
|
cloneClip ({ file, duration }) {
|
||||||
let subPath
|
const storagePath = this.configPlayout.storage.path
|
||||||
if (this.folderTree.tree[0].includes('/')) {
|
const storagePathArr = storagePath.split('/')
|
||||||
subPath = this.folderTree.tree[0].replace(/.*\//, '') + '/'
|
const storageRoot = storagePathArr.pop()
|
||||||
} else {
|
const sourcePath = `${storagePathArr.join('/')}/${this.folderTree.tree[0].substring(this.folderTree.tree[0].indexOf(storageRoot))}`
|
||||||
subPath = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
source: `${this.configPlayout.storage.path}/${subPath}${file}`,
|
source: `${sourcePath}/${file}`,
|
||||||
in: 0,
|
in: 0,
|
||||||
out: duration,
|
out: duration,
|
||||||
duration
|
duration
|
||||||
@ -499,7 +507,10 @@ export default {
|
|||||||
|
|
||||||
await this.$axios.post(
|
await this.$axios.post(
|
||||||
'api/player/playlist/',
|
'api/player/playlist/',
|
||||||
{ data: { channel: this.$store.state.config.configGui.channel, date: saveDate, program: saveList } }
|
{
|
||||||
|
data: { channel: this.$store.state.config.configGui.channel, date: saveDate, program: saveList },
|
||||||
|
config_path: this.configGui[this.configID].playout_config
|
||||||
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
showCopyModal () {
|
showCopyModal () {
|
||||||
@ -705,10 +716,18 @@ export default {
|
|||||||
border-color: #515763;
|
border-color: #515763;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-group-header {
|
||||||
|
height: 46px;
|
||||||
|
}
|
||||||
|
|
||||||
.playlist-list-group, #playlist-group {
|
.playlist-list-group, #playlist-group {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#scroll-container {
|
||||||
|
height: calc(100% - 46px);
|
||||||
|
}
|
||||||
|
|
||||||
.playlist-item:nth-of-type(even), .playlist-item:nth-of-type(even) div .timecode input {
|
.playlist-item:nth-of-type(even), .playlist-item:nth-of-type(even) div .timecode input {
|
||||||
background-color: #3b424a;
|
background-color: #3b424a;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user