mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-05-13 01:19:55 +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,
|
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…
Reference in New Issue
Block a user