diff --git a/ffplayout/frontend/pages/media.vue b/ffplayout/frontend/pages/media.vue index 0eab2caf..e311c788 100644 --- a/ffplayout/frontend/pages/media.vue +++ b/ffplayout/frontend/pages/media.vue @@ -2,6 +2,13 @@
+
@@ -9,7 +16,7 @@ v-for="(crumb, index) in crumbs" :key="crumb.key" :active="index === crumbs.length - 1" - @click="getPath(crumb.path)" + @click="getPath(extensions, crumb.path)" > {{ crumb.text }} @@ -25,7 +32,7 @@ :key="folder.key" class="browser-item" > - + {{ folder }} @@ -51,6 +58,7 @@
+
@@ -81,22 +90,32 @@ export default { data () { return { + isLoading: false, + extensions: '', inputFile: null } }, computed: { + ...mapState('config', ['configGui', 'configPlayout']), ...mapState('media', ['crumbs', 'folderTree']) }, - created () { - this.getPath('') + async created () { + await this.$store.dispatch('auth/inspectToken') + await this.$store.dispatch('config/getGuiConfig') + await this.$store.dispatch('config/getPlayoutConfig') + + this.extensions = [...this.configPlayout.storage.extensions, ...this.configGui.extra_extensions].join(' ') + this.getPath(this.extensions, '') }, methods: { - async getPath (path) { + async getPath (extensions, path) { + this.isLoading = true await this.$store.dispatch('auth/inspectToken') - await this.$store.dispatch('media/getTree', path) + await this.$store.dispatch('media/getTree', { extensions, path }) + this.isLoading = false }, async onSubmit (evt) { @@ -148,5 +167,4 @@ export default { border: 1px solid #000; border-radius: 5px; } -