mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-05-09 01:16:46 +02:00
Remove numEpisodes subquery from podcasst page query
This commit is contained in:
parent
2e48ec0dde
commit
707533df8f
@ -159,7 +159,7 @@ module.exports = {
|
||||
replacements,
|
||||
distinct: true,
|
||||
attributes: {
|
||||
include: [[Sequelize.literal(`(SELECT count(*) FROM podcastEpisodes pe WHERE pe.podcastId = podcast.id)`), 'numEpisodes'], ...podcastIncludes]
|
||||
include: [...podcastIncludes]
|
||||
},
|
||||
include: [
|
||||
{
|
||||
@ -187,9 +187,6 @@ module.exports = {
|
||||
if (podcast.dataValues.numEpisodesIncomplete) {
|
||||
libraryItem.numEpisodesIncomplete = podcast.dataValues.numEpisodesIncomplete
|
||||
}
|
||||
if (podcast.dataValues.numEpisodes) {
|
||||
podcast.numEpisodes = podcast.dataValues.numEpisodes
|
||||
}
|
||||
|
||||
libraryItem.media = podcast
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user