mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-05-13 01:19:55 +02:00
Merge pull request #4034 from nichwall/custom-metadata-provider-logging
Add: log custom metadata provider to match other providers
This commit is contained in:
commit
373d14a49e
@ -41,6 +41,9 @@ class CustomProviderAdapter {
|
|||||||
}
|
}
|
||||||
const queryString = new URLSearchParams(queryObj).toString()
|
const queryString = new URLSearchParams(queryObj).toString()
|
||||||
|
|
||||||
|
const url = `${provider.url}/search?${queryString}`
|
||||||
|
Logger.debug(`[CustomMetadataProvider] Search url: ${url}`)
|
||||||
|
|
||||||
// Setup headers
|
// Setup headers
|
||||||
const axiosOptions = {
|
const axiosOptions = {
|
||||||
timeout
|
timeout
|
||||||
@ -52,7 +55,7 @@ class CustomProviderAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const matches = await axios
|
const matches = await axios
|
||||||
.get(`${provider.url}/search?${queryString}`, axiosOptions)
|
.get(url, axiosOptions)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (!res?.data || !Array.isArray(res.data.matches)) return null
|
if (!res?.data || !Array.isArray(res.data.matches)) return null
|
||||||
return res.data.matches
|
return res.data.matches
|
||||||
|
Loading…
Reference in New Issue
Block a user