Merge branch 'master' into mf/rssInboundManager

This commit is contained in:
mfcar 2023-10-01 00:34:38 +01:00
commit 4de5b92fa7
No known key found for this signature in database
44 changed files with 991 additions and 109 deletions

View file

@ -167,6 +167,30 @@ class AuthorController {
}
}
/**
* DELETE: /api/authors/:id
* Remove author from all books and delete
*
* @param {import('express').Request} req
* @param {import('express').Response} res
*/
async delete(req, res) {
Logger.info(`[AuthorController] Removing author "${req.author.name}"`)
await Database.authorModel.removeById(req.author.id)
if (req.author.imagePath) {
await CacheManager.purgeImageCache(req.author.id) // Purge cache
}
SocketAuthority.emitter('author_removed', req.author.toJSON())
// Update filter data
Database.removeAuthorFromFilterData(req.author.libraryId, req.author.id)
res.sendStatus(200)
}
async match(req, res) {
let authorData = null
const region = req.body.region || 'us'

View file

@ -620,7 +620,7 @@ class LibraryController {
model: Database.bookModel,
attributes: ['id', 'tags', 'explicit'],
where: bookWhere,
required: true,
required: false,
through: {
attributes: []
}

View file

@ -196,7 +196,7 @@ class MeController {
const libraryItem = await Database.libraryItemModel.getOldById(localProgress.libraryItemId)
if (!libraryItem) {
Logger.error(`[MeController] syncLocalMediaProgress invalid local media progress object no library item`, localProgress)
Logger.error(`[MeController] syncLocalMediaProgress invalid local media progress object no library item with id "${localProgress.libraryItemId}"`, localProgress)
continue
}

View file

@ -91,7 +91,7 @@ class PodcastController {
res.json(libraryItem.toJSONExpanded())
if (payload.episodesToDownload && payload.episodesToDownload.length) {
if (payload.episodesToDownload?.length) {
Logger.info(`[PodcastController] Podcast created now starting ${payload.episodesToDownload.length} episode downloads`)
this.podcastManager.downloadPodcastEpisodes(libraryItem, payload.episodesToDownload)
}