Skip to content

Commit 4c29c75

Browse files
committed
fix(music): Remove sorting criteria for songs
- Removed the sorting criteria for the songs collection - This change simplifies the processing and allows the songs to retain their original order - Commented out the sortBy method instead of deleting it for future reference
1 parent f786b61 commit 4c29c75

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

app/Music.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ public function search(string $keyword, array $sources = []): Collection
6464
))
6565
->collapse()
6666
->pipe(fn (Collection $songs): Collection => $this->ensureWithUrls($songs))
67-
->sortBy([
68-
// ['name', \SORT_ASC],
69-
['name', 'asc'],
70-
['artist', 'asc'],
71-
['size', 'desc'],
72-
['br', 'desc'],
73-
['album', 'asc'],
74-
['source', 'asc'],
75-
])
67+
// ->sortBy([
68+
// // ['name', \SORT_ASC],
69+
// ['name', 'asc'],
70+
// ['artist', 'asc'],
71+
// ['size', 'desc'],
72+
// ['br', 'desc'],
73+
// ['album', 'asc'],
74+
// ['source', 'asc'],
75+
// ])
7676
->values()
7777
->mapWithKeys(static fn (array $song, int $index): array => [$index + 1 => $song]),
7878
$this->minCallMicroseconds

0 commit comments

Comments
 (0)