From 19dcb6173e145d08026135eace199160ac9a6698 Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 6 Oct 2021 07:23:32 -0500 Subject: [PATCH] Fix download requests, v1.4.0 rollout --- client/components/modals/edit-tabs/Tracks.vue | 2 +- client/components/tables/TracksTable.vue | 6 ++---- client/store/audiobooks.js | 3 +-- server/Server.js | 3 +++ 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/components/modals/edit-tabs/Tracks.vue b/client/components/modals/edit-tabs/Tracks.vue index dd88a0a6..b89d4164 100644 --- a/client/components/modals/edit-tabs/Tracks.vue +++ b/client/components/modals/edit-tabs/Tracks.vue @@ -69,7 +69,7 @@ export default { return { ...track, - relativePath: trackPath.replace(audiobookPath) + relativePath: trackPath.replace(audiobookPath, '') } }) }, diff --git a/client/components/tables/TracksTable.vue b/client/components/tables/TracksTable.vue index 96cf9686..700cdbcc 100644 --- a/client/components/tables/TracksTable.vue +++ b/client/components/tables/TracksTable.vue @@ -26,9 +26,7 @@

{{ track.index }}

- - {{ track.filename }} - + {{ track.filename }} {{ $bytesPretty(track.size) }} @@ -77,7 +75,7 @@ export default { return { ...track, - relativePath: trackPath.replace(audiobookPath) + relativePath: trackPath.replace(audiobookPath, '') } }) }, diff --git a/client/store/audiobooks.js b/client/store/audiobooks.js index 937cb7bd..fc5729cf 100644 --- a/client/store/audiobooks.js +++ b/client/store/audiobooks.js @@ -187,8 +187,7 @@ export const actions = { commit('set', []) }) return true - }, - + } } export const mutations = { diff --git a/server/Server.js b/server/Server.js index cd964b3f..6157e563 100644 --- a/server/Server.js +++ b/server/Server.js @@ -127,6 +127,9 @@ class Server { // Metadata folder static path app.use('/metadata', this.authMiddleware.bind(this), express.static(this.MetadataPath)) + // Downloads folder static path + app.use('/downloads', this.authMiddleware.bind(this), express.static(this.downloadManager.downloadDirPath)) + // Static folder app.use(express.static(Path.join(global.appRoot, 'static')))