mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-13 15:29:38 +00:00
Fix: escape special characters in provider urls
This commit is contained in:
parent
5edff98942
commit
02db145a0c
5 changed files with 15 additions and 4 deletions
|
|
@ -32,8 +32,12 @@ class GoogleBooks {
|
|||
}
|
||||
|
||||
async search(title, author) {
|
||||
title = encodeURIComponent(title)
|
||||
var queryString = `q=intitle:${title}`
|
||||
if (author) queryString += `+inauthor:${author}`
|
||||
if (author) {
|
||||
author = encodeURIComponent(author)
|
||||
queryString += `+inauthor:${author}`
|
||||
}
|
||||
var url = `https://www.googleapis.com/books/v1/volumes?${queryString}`
|
||||
Logger.debug(`[GoogleBooks] Search url: ${url}`)
|
||||
var items = await axios.get(url).then((res) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue