mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-24 17:59:06 +02:00
Added support for custom metadata providers
WiP but already open to feedback
This commit is contained in:
parent
8c6a2ac5dd
commit
8027c4a06f
14 changed files with 642 additions and 4 deletions
|
@ -51,6 +51,11 @@ class LibraryController {
|
|||
}
|
||||
}
|
||||
|
||||
// Validate that the custom provider exists if given any
|
||||
if (newLibraryPayload.provider && newLibraryPayload.provider.startsWith("custom-")) {
|
||||
await Database.doesCustomProviderExistBySlug(newLibraryPayload.provider)
|
||||
}
|
||||
|
||||
const library = new Library()
|
||||
|
||||
let currentLargestDisplayOrder = await Database.libraryModel.getMaxDisplayOrder()
|
||||
|
@ -175,6 +180,11 @@ class LibraryController {
|
|||
}
|
||||
}
|
||||
|
||||
// Validate that the custom provider exists if given any
|
||||
if (req.body.provider && req.body.provider.startsWith("custom-")) {
|
||||
await Database.doesCustomProviderExistBySlug(req.body.provider)
|
||||
}
|
||||
|
||||
const hasUpdates = library.update(req.body)
|
||||
// TODO: Should check if this is an update to folder paths or name only
|
||||
if (hasUpdates) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue