From c282d5e81c48ae68b845885a5ee04ccd3a0b3fc5 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Thu, 8 Sep 2022 22:55:41 +0200 Subject: [PATCH] fix(legacy): track_type_id should cast to int not text (#2112) Fixes #2111 --- legacy/application/models/StoredFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/application/models/StoredFile.php b/legacy/application/models/StoredFile.php index dc67aedbc..af096da1f 100644 --- a/legacy/application/models/StoredFile.php +++ b/legacy/application/models/StoredFile.php @@ -749,7 +749,7 @@ SQL; $streamSelect[] = 'EXTRACT(YEAR FROM utime)::varchar AS ' . $key; } // need to cast certain data as ints for the union to search on. - elseif (in_array($key, ['track_number', 'bit_rate', 'sample_rate', 'bpm'])) { + elseif (in_array($key, ['track_number', 'bit_rate', 'sample_rate', 'bpm', 'track_type_id'])) { $plSelect[] = 'NULL::int AS ' . $key; $blSelect[] = 'NULL::int AS ' . $key; $fileSelect[] = $key;