diff --git a/.gitignore b/.gitignore index 8b7d651c..d0210244 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,5 @@ sw.* master.m3u8 tv-media tv-media/ +Videos +Videos/ diff --git a/nuxt.config.js b/nuxt.config.js index dddf515d..e2b7ad90 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -7,7 +7,8 @@ export default { */ head: { title: process.env.npm_package_name || '', - meta: [{ + meta: [ + { charset: 'utf-8' }, { @@ -20,11 +21,13 @@ export default { content: process.env.npm_package_description || '' } ], - link: [{ - rel: 'icon', - type: 'image/x-icon', - href: '/favicon.ico' - }] + link: [ + { + rel: 'icon', + type: 'image/x-icon', + href: '/favicon.ico' + } + ] }, /* ** Customize the progress-bar color @@ -35,9 +38,7 @@ export default { /* ** Global CSS */ - css: [ - '@/assets/css/bootstrap.min.css' - ], + css: ['@/assets/css/bootstrap.min.css'], /* ** Plugins to load before mounting the App */ @@ -85,17 +86,11 @@ export default { locales: ['en', 'de'], defaultLocale: 'en', defaultTimeZone: 'Europe/Berlin', - plugins: [ - 'utc', - 'timezone' - ] + plugins: ['utc', 'timezone'] }, styleResources: { - scss: [ - '@/assets/css/_variables.scss', - '@/assets/scss/globals.scss' - ] + scss: ['@/assets/css/_variables.scss', '@/assets/scss/globals.scss'] }, bootstrapVue: { @@ -110,14 +105,14 @@ export default { /* ** You can extend webpack config here */ - extend(config, ctx) {}, + extend (config, ctx) {}, babel: { compact: true }, loaders: { sass: { - implementation: require('sass'), + implementation: require('sass') }, scss: { - implementation: require('sass'), + implementation: require('sass') } } } diff --git a/pages/media.vue b/pages/media.vue index 53129b01..6ae53b58 100644 --- a/pages/media.vue +++ b/pages/media.vue @@ -82,7 +82,7 @@ {{ file }} - + @@ -90,12 +90,12 @@ {{ file.duration | toMin }} - + - + @@ -468,8 +468,7 @@ export default { this.$root.$emit('bv::show::modal', 'preview-modal') }, - showRenameModal (path, file) { - this.renamePath = path + showRenameModal (file) { this.renameOldName = file this.renameNewName = file this.$root.$emit('bv::show::modal', 'rename-modal') @@ -478,12 +477,10 @@ export default { async renameFile (evt) { evt.preventDefault() - await this.$axios.patch( - 'api/player/media/op/', { - path: this.renamePath.replace(/^\/\//g, '/'), - oldname: this.renameOldName, - newname: this.renameNewName, - channel: this.configGui[this.configID].id + await this.$axios.post( + `api/file/${this.configGui[this.configID].id}/rename/`, { + source: `/${this.folderTree.parent}/${this.folderTree.source}/${this.renameOldName}`.replace('//', '/'), + target: `/${this.folderTree.parent}/${this.folderTree.source}/${this.renameNewName}`.replace('//', '/') } ) diff --git a/store/media.js b/store/media.js index f761544b..a05b1ea0 100644 --- a/store/media.js +++ b/store/media.js @@ -25,21 +25,20 @@ export const actions = { `api/file/${channel}/browse/`, { source: path }) if (response.data) { - console.log(response.data) - const pathArr = response.data.source.split('/') - - console.log(pathArr) - console.log('path', path) + const pathStr = 'Home/' + response.data.source + const pathArr = pathStr.split('/') if (path) { for (const crumb of pathArr) { - if (crumb) { + if (crumb === 'Home') { + crumbs.push({ text: crumb, path: root }) + } else if (crumb) { root += crumb + '/' crumbs.push({ text: crumb, path: root }) } } } else { - crumbs.push({ text: pathArr[0], path: '' }) + crumbs.push({ text: 'Home', path: '' }) } commit('UPDATE_CURRENT_PATH', path)