Skip to content

Commit

Permalink
Show audios in reverse order
Browse files Browse the repository at this point in the history
  • Loading branch information
mrilyew committed Nov 14, 2023
1 parent 2ea9136 commit 1f340e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Web/Models/Repositories/Audios.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function getPlaylistByOwnerAndVID(int $owner, int $vId): ?Playlist
function getByEntityID(int $entity, int $offset = 0, ?int $limit = NULL, ?int& $deleted = nullptr): \Traversable
{
$limit ??= OPENVK_DEFAULT_PER_PAGE;
$iter = $this->rels->where("entity", $entity)->limit($limit, $offset);
$iter = $this->rels->where("entity", $entity)->limit($limit, $offset)->order("index DESC");
foreach($iter as $rel) {
$audio = $this->get($rel->audio);
if(!$audio || $audio->isDeleted()) {
Expand Down

0 comments on commit 1f340e3

Please sign in to comment.