Skip to content

Commit

Permalink
Stop sorting tracks by year
Browse files Browse the repository at this point in the history
Fixes #777
Some tracks in the same album may be produced in different years, so the order is messed up within the same album. With this change, we lose the ability to see albums by year of release.
  • Loading branch information
martpie committed Oct 22, 2024
1 parent b791622 commit 3165b55
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/utils-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ export type SortConfig = Array<TrackKeys | IterateeFunction>;

// Declarations
const SORT_ORDERS: Record<SortBy, SortConfig> = {
Artist: [ARTIST, 'year', ALBUM, 'disk.no', 'track.no'],
Title: [TITLE, ARTIST, 'year', ALBUM, 'disk.no', 'track.no'],
Duration: ['duration', ARTIST, 'year', ALBUM, 'disk.no', 'track.no'],
Album: [ALBUM, ARTIST, 'year', 'disk.no', 'track.no'],
Genre: [GENRE, ARTIST, 'year', ALBUM, 'disk.no', 'track.no'],
Artist: [ARTIST, ALBUM, 'disk.no', 'track.no'],
Title: [TITLE, ARTIST, ALBUM, 'disk.no', 'track.no'],
Duration: ['duration', ARTIST, ALBUM, 'disk.no', 'track.no'],
Album: [ALBUM, ARTIST, 'disk.no', 'track.no'],
Genre: [GENRE, ARTIST, ALBUM, 'disk.no', 'track.no'],
};

export function getSortOrder(sortBy: SortBy): SortConfig {
Expand Down

0 comments on commit 3165b55

Please sign in to comment.