mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-15 11:54:56 +02:00
Use HTTPS for Google Books Images
The API for Google Books will return HTTP image URLs when matiching any books using it as a search provider. In a secure environment, this causes browser warnings. All Google image links support HTTPS and we can safely switch to HTTOS to avoid these warnings.
This commit is contained in:
parent
10295b000a
commit
b47ce4fb24
1 changed files with 2 additions and 1 deletions
|
@ -20,7 +20,8 @@ class GoogleBooks {
|
|||
let cover = null
|
||||
// Selects the largest cover assuming the largest is the last key in the object
|
||||
if (imageLinks && Object.keys(imageLinks).length) {
|
||||
cover = imageLinks[Object.keys(imageLinks).pop()] || null
|
||||
cover = imageLinks[Object.keys(imageLinks).pop()]
|
||||
cover = cover?.replace(/^http:/, 'https:') || null
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue