Fixes #5956 -- Sort podcast episodes by upload date.

This commit is contained in:
Buster Neece 2022-12-26 12:14:26 -06:00
parent f32286236c
commit 33e4c45466
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
2 changed files with 3 additions and 2 deletions

View File

@ -211,7 +211,7 @@ final class PodcastEpisodesController extends AbstractApiCrudController
->join('e.podcast', 'p')
->leftJoin('e.media', 'pm')
->where('e.podcast = :podcast')
->orderBy('e.title', 'ASC')
->orderBy('e.created_at', 'DESC')
->setParameter('podcast', $podcast);
$searchPhrase = trim($request->getParam('searchPhrase', ''));

View File

@ -9,9 +9,9 @@ use App\Doctrine\Repository;
use App\Entity;
use App\Exception\InvalidPodcastMediaFileException;
use App\Exception\StorageLocationFullException;
use App\Flysystem\ExtendedFilesystemInterface;
use App\Media\AlbumArt;
use App\Media\MetadataManager;
use App\Flysystem\ExtendedFilesystemInterface;
use League\Flysystem\UnableToDeleteFile;
use League\Flysystem\UnableToRetrieveMetadata;
@ -62,6 +62,7 @@ final class PodcastEpisodeRepository extends Repository
->from(Entity\PodcastEpisode::class, 'pe')
->where('pe.podcast = :podcast')
->setParameter('podcast', $podcast)
->orderBy('pe.created_at', 'DESC')
->getQuery()
->getResult();