ajout filtre et tri pour chansons

This commit is contained in:
2024-06-10 11:42:39 +02:00
parent ceb305ab7d
commit cf30176e41
2 changed files with 6 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ class Model_music extends CI_Model {
if (!empty($album)) {
$this->db->where_in('album.name', $album);
}
if ($sort && in_array($sort, ['year', 'artistName', 'name', 'genreName'])) {
if ($sort && in_array($sort, ['year', 'artistName', 'name', 'albumName', 'genreName'])) {
$this->db->order_by($sort, $order);
}
$query = $this->db->get();