mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-17 00:08:55 +01:00
Fix ebook url, add opus to uploader, set chapters after track updates
This commit is contained in:
parent
1637b6c7f0
commit
a590e795e3
@ -17,6 +17,8 @@
|
|||||||
<controls-global-search />
|
<controls-global-search />
|
||||||
<div class="flex-grow" />
|
<div class="flex-grow" />
|
||||||
|
|
||||||
|
<span v-if="showExperimentalFeatures" class="material-icons text-4xl text-warning pr-4">logo_dev</span>
|
||||||
|
|
||||||
<nuxt-link v-if="userCanUpload" to="/upload" class="outline-none hover:text-gray-200 cursor-pointer w-8 h-8 flex items-center justify-center">
|
<nuxt-link v-if="userCanUpload" to="/upload" class="outline-none hover:text-gray-200 cursor-pointer w-8 h-8 flex items-center justify-center">
|
||||||
<span class="material-icons">upload</span>
|
<span class="material-icons">upload</span>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
@ -117,6 +119,9 @@ export default {
|
|||||||
},
|
},
|
||||||
processingBatch() {
|
processingBatch() {
|
||||||
return this.$store.state.processingBatch
|
return this.$store.state.processingBatch
|
||||||
|
},
|
||||||
|
showExperimentalFeatures() {
|
||||||
|
return this.$store.state.showExperimentalFeatures
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -70,7 +70,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
fullUrl() {
|
fullUrl() {
|
||||||
var serverUrl = process.env.serverUrl
|
var serverUrl = process.env.serverUrl || '/local'
|
||||||
return `${serverUrl}/${this.url}`
|
return `${serverUrl}/${this.url}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -120,9 +120,9 @@ export default {
|
|||||||
title: null,
|
title: null,
|
||||||
author: null,
|
author: null,
|
||||||
series: null,
|
series: null,
|
||||||
acceptedAudioFormats: ['.mp3', '.m4b', '.m4a', '.flac'],
|
acceptedAudioFormats: ['.mp3', '.m4b', '.m4a', '.flac', '.opus'],
|
||||||
acceptedImageFormats: ['.png', '.jpg', '.jpeg', '.webp'],
|
acceptedImageFormats: ['.png', '.jpg', '.jpeg', '.webp'],
|
||||||
inputAccept: '.png, .jpg, .jpeg, .webp, .mp3, .m4b, .m4a, .flac',
|
inputAccept: '.png, .jpg, .jpeg, .webp, .mp3, .m4b, .m4a, .flac, .opus',
|
||||||
isDragOver: false,
|
isDragOver: false,
|
||||||
showUploader: true,
|
showUploader: true,
|
||||||
validAudioFiles: [],
|
validAudioFiles: [],
|
||||||
|
@ -6,7 +6,8 @@ module.exports = {
|
|||||||
safelist: [
|
safelist: [
|
||||||
'bg-success',
|
'bg-success',
|
||||||
'bg-red-600',
|
'bg-red-600',
|
||||||
'py-1.5'
|
'py-1.5',
|
||||||
|
'bg-info'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -439,20 +439,23 @@ class Server {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
testFileSystem(req, res) {
|
async testFileSystem(req, res) {
|
||||||
Logger.debug(`[Server] Running fs test`)
|
Logger.debug(`[Server] Running fs test`)
|
||||||
var paths = fs.readdir(global.appRoot)
|
var paths = await fs.readdir(global.appRoot)
|
||||||
Logger.debug(paths)
|
Logger.debug(paths)
|
||||||
var pathMap = {}
|
var pathMap = {}
|
||||||
if (paths && paths.length) {
|
if (paths && paths.length) {
|
||||||
for (let i = 0; i < paths.length; i++) {
|
for (let i = 0; i < paths.length; i++) {
|
||||||
var fullPath = Path.join(global.appRoot, paths[i])
|
var fullPath = Path.join(global.appRoot, paths[i])
|
||||||
Logger.debug('Checking path', fullPath)
|
Logger.debug('Checking path', fullPath)
|
||||||
var _paths = fs.readdir(fullPath)
|
var isDirectory = fs.lstatSync(fullPath).isDirectory()
|
||||||
|
if (isDirectory) {
|
||||||
|
var _paths = await fs.readdir(fullPath)
|
||||||
Logger.debug(_paths)
|
Logger.debug(_paths)
|
||||||
pathMap[paths[i]] = _paths
|
pathMap[paths[i]] = _paths
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Logger.debug('Finished fs test')
|
Logger.debug('Finished fs test')
|
||||||
res.json(pathMap)
|
res.json(pathMap)
|
||||||
}
|
}
|
||||||
|
@ -390,6 +390,7 @@ class Audiobook {
|
|||||||
this.addTrack(file)
|
this.addTrack(file)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.setChapters()
|
||||||
this.lastUpdate = Date.now()
|
this.lastUpdate = Date.now()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user