Add:Chapter editor, lookup chapters via audnexus, chapters table on audiobook landing page #435

This commit is contained in:
advplyr 2022-05-10 17:03:41 -05:00
parent 095f49824e
commit cc1181b301
16 changed files with 613 additions and 108 deletions

View file

@ -45,5 +45,15 @@ class Audnexus {
name: author.name
}
}
async getChaptersByASIN(asin) {
Logger.debug(`[Audnexus] Get chapters for ASIN ${asin}`)
return axios.get(`${this.baseUrl}/books/${asin}/chapters`).then((res) => {
return res.data
}).catch((error) => {
Logger.error(`[Audnexus] Chapter ASIN request failed for ${asin}`, error)
return null
})
}
}
module.exports = Audnexus