mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-28 22:08:36 +02:00
Remove numEpisodes subquery from podcasst page query
This commit is contained in:
parent
2e48ec0dde
commit
707533df8f
1 changed files with 1 additions and 4 deletions
|
@ -159,7 +159,7 @@ module.exports = {
|
||||||
replacements,
|
replacements,
|
||||||
distinct: true,
|
distinct: true,
|
||||||
attributes: {
|
attributes: {
|
||||||
include: [[Sequelize.literal(`(SELECT count(*) FROM podcastEpisodes pe WHERE pe.podcastId = podcast.id)`), 'numEpisodes'], ...podcastIncludes]
|
include: [...podcastIncludes]
|
||||||
},
|
},
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
|
@ -187,9 +187,6 @@ module.exports = {
|
||||||
if (podcast.dataValues.numEpisodesIncomplete) {
|
if (podcast.dataValues.numEpisodesIncomplete) {
|
||||||
libraryItem.numEpisodesIncomplete = podcast.dataValues.numEpisodesIncomplete
|
libraryItem.numEpisodesIncomplete = podcast.dataValues.numEpisodesIncomplete
|
||||||
}
|
}
|
||||||
if (podcast.dataValues.numEpisodes) {
|
|
||||||
podcast.numEpisodes = podcast.dataValues.numEpisodes
|
|
||||||
}
|
|
||||||
|
|
||||||
libraryItem.media = podcast
|
libraryItem.media = podcast
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue