mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 21:17:37 +03:00
Fix sorting albums by year (should use name as secondary sort field).
Relates to https://github.com/navidrome/navidrome/issues/961#issuecomment-967624681
This commit is contained in:
parent
3bd6f82c80
commit
d4447e373f
4 changed files with 5 additions and 5 deletions
|
@ -164,7 +164,7 @@ const AlbumGridTile = ({ showArtist, record, basePath, ...props }) => {
|
|||
<RangeField
|
||||
record={record}
|
||||
source={'year'}
|
||||
sortBy={'maxYear'}
|
||||
sortBy={'max_year'}
|
||||
sortByOrder={'DESC'}
|
||||
className={classes.albumSubtitle}
|
||||
/>
|
||||
|
|
|
@ -91,7 +91,7 @@ const AlbumTableView = ({
|
|||
<NumberField source="playCount" sortByOrder={'DESC'} />
|
||||
),
|
||||
year: (
|
||||
<RangeField source={'year'} sortBy={'maxYear'} sortByOrder={'DESC'} />
|
||||
<RangeField source={'year'} sortBy={'max_year'} sortByOrder={'DESC'} />
|
||||
),
|
||||
duration: isDesktop && <DurationField source="duration" />,
|
||||
rating: config.enableStarRating && (
|
||||
|
@ -132,7 +132,7 @@ const AlbumTableView = ({
|
|||
)}
|
||||
tertiaryText={(r) => (
|
||||
<>
|
||||
<RangeField record={r} source={'year'} sortBy={'maxYear'} />
|
||||
<RangeField record={r} source={'year'} sortBy={'max_year'} />
|
||||
|
||||
</>
|
||||
)}
|
||||
|
|
|
@ -62,7 +62,7 @@ const AlbumShowLayout = (props) => {
|
|||
addLabel={false}
|
||||
reference="album"
|
||||
target="artist_id"
|
||||
sort={{ field: 'maxYear', order: 'ASC' }}
|
||||
sort={{ field: 'max_year', order: 'ASC' }}
|
||||
filter={{ artist_id: record?.id }}
|
||||
perPage={0}
|
||||
pagination={null}
|
||||
|
|
|
@ -10,7 +10,7 @@ export const useGetHandleArtistClick = (width) => {
|
|||
return (id) => {
|
||||
return config.devShowArtistPage && id !== config.variousArtistsId
|
||||
? `/artist/${id}/show`
|
||||
: `/album?filter={"artist_id":"${id}"}&order=ASC&sort=maxYear&displayedFilters={"compilation":true}&perPage=${perPage}`
|
||||
: `/album?filter={"artist_id":"${id}"}&order=ASC&sort=max_year&displayedFilters={"compilation":true}&perPage=${perPage}`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue