mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-06 03:49:40 +00:00
Fix Upload Lookup
This commit is contained in:
parent
d8e272e091
commit
a5d2c1bd64
2 changed files with 3 additions and 3 deletions
|
|
@ -88,10 +88,10 @@ class SearchController {
|
|||
const provider = getQueryParamAsString(query, 'provider', 'google')
|
||||
const title = getQueryParamAsString(query, 'title', '')
|
||||
const author = getQueryParamAsString(query, 'author', '')
|
||||
const id = getQueryParamAsString(query, 'id', '', true)
|
||||
const id = getQueryParamAsString(query, 'id', undefined)
|
||||
|
||||
// Fetch library item
|
||||
const libraryItem = await SearchController.fetchLibraryItem(id)
|
||||
const libraryItem = id ? await SearchController.fetchLibraryItem(id) : null
|
||||
|
||||
const results = await BookFinder.search(libraryItem, provider, title, author)
|
||||
res.json(results)
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ class BookFinder {
|
|||
}
|
||||
}
|
||||
|
||||
if (books.length) {
|
||||
if (books.length && libraryItem) {
|
||||
const isAudibleProvider = provider.startsWith('audible')
|
||||
const libraryItemDurationMinutes = libraryItem?.media?.duration ? libraryItem.media.duration / 60 : null
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue