fix(premium-podcasts): show premium flag only when podcast has published premium episodes

This commit is contained in:
Yassine Doghri 2023-08-28 14:01:33 +00:00
parent 7d21b3509e
commit d10c4fd753
1 changed files with 3 additions and 1 deletions

View File

@ -471,7 +471,9 @@ class EpisodeModel extends UuidModel
->where([
'podcast_id' => $podcastId,
'is_premium' => true,
])->countAllResults() > 0;
])
->where('`published_at` <= UTC_TIMESTAMP()', null, false)
->countAllResults() > 0;
}
public function fullTextSearch(string $query): ?BaseBuilder