support original date display and sort (#1488)

This commit is contained in:
jeffvli
2026-01-04 01:49:51 -08:00
parent e34d84deee
commit af055ab6dd
11 changed files with 164 additions and 26 deletions
+5 -5
View File
@@ -139,7 +139,7 @@ export const getClientType = (): string => {
}
};
export const SEPARATOR_STRING = ' · ';
export const SEPARATOR_STRING = ' ';
export const sortSongList = (songs: Song[], sortBy: SongListSort, sortOrder: SortOrder) => {
let results: Song[] = songs;
@@ -419,13 +419,13 @@ export const sortAlbumList = (albums: Album[], sortBy: AlbumListSort, sortOrder:
results,
[
(v) => {
if (v.releaseDate) {
return new Date(v.releaseDate).getTime();
if (v.originalDate) {
return new Date(v.originalDate).getTime();
}
// Fallback to the first day of the release year
if (v.releaseYear) {
return new Date(v.releaseYear, 0, 1).getTime();
if (v.originalYear) {
return new Date(v.originalYear, 0, 1).getTime();
}
return 0;
},