mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-20 17:58:01 +02:00
Merge pull request #4361 from Vito0912/feat/encoderSettings
Fix: Audiobook m4b advanced encoder ignore
This commit is contained in:
commit
5dc6d613bd
@ -143,10 +143,18 @@ export default {
|
|||||||
localStorage.setItem('embedMetadataCodec', val)
|
localStorage.setItem('embedMetadataCodec', val)
|
||||||
},
|
},
|
||||||
getEncodingOptions() {
|
getEncodingOptions() {
|
||||||
return {
|
if (this.showAdvancedView) {
|
||||||
codec: this.selectedCodec || 'aac',
|
return {
|
||||||
bitrate: this.selectedBitrate || '128k',
|
codec: this.customCodec || this.selectedCodec || 'aac',
|
||||||
channels: this.selectedChannels || 2
|
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() {
|
setPreset() {
|
||||||
|
@ -248,4 +248,4 @@ export default {
|
|||||||
transform: scale(0);
|
transform: scale(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -109,4 +109,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -356,6 +356,8 @@ export default {
|
|||||||
|
|
||||||
const encodeOptions = this.$refs.encoderOptionsCard.getEncodingOptions()
|
const encodeOptions = this.$refs.encoderOptionsCard.getEncodingOptions()
|
||||||
|
|
||||||
|
this.encodingOptions = encodeOptions
|
||||||
|
|
||||||
const queryParams = new URLSearchParams(encodeOptions)
|
const queryParams = new URLSearchParams(encodeOptions)
|
||||||
|
|
||||||
this.processing = true
|
this.processing = true
|
||||||
|
@ -203,7 +203,15 @@ class AbMergeManager {
|
|||||||
// Move library item tracks to cache
|
// Move library item tracks to cache
|
||||||
for (const [index, trackPath] of task.data.originalTrackPaths.entries()) {
|
for (const [index, trackPath] of task.data.originalTrackPaths.entries()) {
|
||||||
const trackFilename = Path.basename(trackPath)
|
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}`)
|
Logger.debug(`[AbMergeManager] Backing up original track "${trackPath}" to ${moveToPath}`)
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
// copy the first track to the cache directory
|
// copy the first track to the cache directory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user