From 9968743a9349c28bd5e22268e943757d0b60567a Mon Sep 17 00:00:00 2001 From: Vito0912 <86927734+Vito0912@users.noreply.github.com> Date: Mon, 2 Jun 2025 19:32:52 +0200 Subject: [PATCH 1/4] fix wrong display and ignored values --- client/components/widgets/EncoderOptionsCard.vue | 16 ++++++++++++---- client/pages/audiobook/_id/manage.vue | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/client/components/widgets/EncoderOptionsCard.vue b/client/components/widgets/EncoderOptionsCard.vue index 005563b4..977d766b 100644 --- a/client/components/widgets/EncoderOptionsCard.vue +++ b/client/components/widgets/EncoderOptionsCard.vue @@ -143,10 +143,18 @@ export default { localStorage.setItem('embedMetadataCodec', val) }, getEncodingOptions() { - return { - codec: this.selectedCodec || 'aac', - bitrate: this.selectedBitrate || '128k', - channels: this.selectedChannels || 2 + if (this.showAdvancedView) { + return { + codec: this.customCodec || this.selectedCodec || 'aac', + bitrate: this.customBitrate || this.selectedBitrate || '128k', + channels: this.customChannels || this.selectedChannels || 2 + } + } else { + return { + codec: this.selectedCodec || 'aac', + bitrate: this.selectedBitrate || '128k', + channels: this.selectedChannels || 2 + } } }, setPreset() { diff --git a/client/pages/audiobook/_id/manage.vue b/client/pages/audiobook/_id/manage.vue index 7afe12a9..f5db9cce 100644 --- a/client/pages/audiobook/_id/manage.vue +++ b/client/pages/audiobook/_id/manage.vue @@ -356,6 +356,8 @@ export default { const encodeOptions = this.$refs.encoderOptionsCard.getEncodingOptions() + this.encodingOptions = encodeOptions; + const queryParams = new URLSearchParams(encodeOptions) this.processing = true From b6995ba5d1573c7186b01b63d1443cc20d20503b Mon Sep 17 00:00:00 2001 From: Vito0912 <86927734+Vito0912@users.noreply.github.com> Date: Mon, 2 Jun 2025 19:33:50 +0200 Subject: [PATCH 2/4] prettier --- client/pages/audiobook/_id/manage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pages/audiobook/_id/manage.vue b/client/pages/audiobook/_id/manage.vue index f5db9cce..37734934 100644 --- a/client/pages/audiobook/_id/manage.vue +++ b/client/pages/audiobook/_id/manage.vue @@ -356,7 +356,7 @@ export default { const encodeOptions = this.$refs.encoderOptionsCard.getEncodingOptions() - this.encodingOptions = encodeOptions; + this.encodingOptions = encodeOptions const queryParams = new URLSearchParams(encodeOptions) From 424ef1aec31a0b53997363198a5cd15eb598577d Mon Sep 17 00:00:00 2001 From: Vito0912 <86927734+Vito0912@users.noreply.github.com> Date: Mon, 2 Jun 2025 19:34:25 +0200 Subject: [PATCH 3/4] prettier 2 --- client/components/widgets/LoadingSpinner.vue | 2 +- client/components/widgets/SeriesInputWidget.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/components/widgets/LoadingSpinner.vue b/client/components/widgets/LoadingSpinner.vue index a9c4ef47..8f3de84a 100644 --- a/client/components/widgets/LoadingSpinner.vue +++ b/client/components/widgets/LoadingSpinner.vue @@ -248,4 +248,4 @@ export default { transform: scale(0); } } - \ No newline at end of file + diff --git a/client/components/widgets/SeriesInputWidget.vue b/client/components/widgets/SeriesInputWidget.vue index d6c8cf9f..3dab0605 100644 --- a/client/components/widgets/SeriesInputWidget.vue +++ b/client/components/widgets/SeriesInputWidget.vue @@ -109,4 +109,4 @@ export default { } } } - \ No newline at end of file + From 63ccdb68f0c61a1a28e2bbedb6b49b94490f9cd3 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 2 Jun 2025 16:50:03 -0500 Subject: [PATCH 4/4] Fix m4b encoder backup file overwriting the encoded file when they have the same filename --- server/managers/AbMergeManager.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/managers/AbMergeManager.js b/server/managers/AbMergeManager.js index f6a56160..3611d294 100644 --- a/server/managers/AbMergeManager.js +++ b/server/managers/AbMergeManager.js @@ -203,7 +203,15 @@ class AbMergeManager { // Move library item tracks to cache for (const [index, trackPath] of task.data.originalTrackPaths.entries()) { const trackFilename = Path.basename(trackPath) - const moveToPath = Path.join(task.data.itemCachePath, trackFilename) + let moveToPath = Path.join(task.data.itemCachePath, trackFilename) + + // If the track is the same as the temp file, we need to rename it to avoid overwriting it + if (task.data.tempFilepath === moveToPath) { + const trackExtname = Path.extname(task.data.tempFilepath) + const newTrackFilename = Path.basename(task.data.tempFilepath, trackExtname) + '.backup' + trackExtname + moveToPath = Path.join(task.data.itemCachePath, newTrackFilename) + } + Logger.debug(`[AbMergeManager] Backing up original track "${trackPath}" to ${moveToPath}`) if (index === 0) { // copy the first track to the cache directory