mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-09 10:51:37 +00:00
Added server wide audiobook rating (admin only)
This commit is contained in:
parent
d21fe49ce2
commit
7c3504fe2b
10 changed files with 312 additions and 18 deletions
|
|
@ -193,7 +193,7 @@ class Scanner {
|
|||
*/
|
||||
async quickMatchBookBuildUpdatePayload(apiRouterCtx, libraryItem, matchData, options) {
|
||||
// Update media metadata if not set OR overrideDetails flag
|
||||
const detailKeysToUpdate = ['title', 'subtitle', 'description', 'narrator', 'publisher', 'publishedYear', 'genres', 'tags', 'language', 'explicit', 'abridged', 'asin', 'isbn']
|
||||
const detailKeysToUpdate = ['title', 'subtitle', 'description', 'narrator', 'publisher', 'publishedYear', 'genres', 'tags', 'language', 'explicit', 'abridged', 'asin', 'isbn', 'rating']
|
||||
const updatePayload = {}
|
||||
|
||||
for (const key in matchData) {
|
||||
|
|
@ -236,6 +236,12 @@ class Scanner {
|
|||
}
|
||||
}
|
||||
|
||||
if (matchData.rating && (!libraryItem.media.providerRating || options.overrideDetails)) {
|
||||
updatePayload.providerRating = matchData.rating
|
||||
updatePayload.provider = 'audible'
|
||||
updatePayload.providerId = matchData.asin
|
||||
}
|
||||
|
||||
// Add or set author if not set
|
||||
let hasAuthorUpdates = false
|
||||
if (matchData.author && (!libraryItem.media.authorName || options.overrideDetails)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue