1
0
mirror of https://github.com/Radarr/Radarr synced 2025-10-06 02:02:54 +02:00

New: Add Year sorting to Discover page

This commit is contained in:
Bwaffles
2025-08-05 14:03:51 -04:00
committed by Robin Dadswell
parent 1d4c506830
commit e88c4bced1
7 changed files with 29 additions and 2 deletions

View File

@@ -47,6 +47,15 @@ function DiscoverMovieSortMenu(props) {
{translate('Studio')}
</SortMenuItem>
<SortMenuItem
name="year"
sortKey={sortKey}
sortDirection={sortDirection}
onPress={onSortSelect}
>
{translate('Year')}
</SortMenuItem>
<SortMenuItem
name="inCinemas"
sortKey={sortKey}

View File

@@ -36,7 +36,8 @@
.imdbRating,
.rottenTomatoesRating,
.traktRating,
.runtime {
.runtime,
.year {
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
flex: 0 0 90px;

View File

@@ -22,6 +22,7 @@ interface CssExports {
'studio': string;
'tmdbRating': string;
'traktRating': string;
'year': string;
}
export const cssExports: CssExports;
export default cssExports;

View File

@@ -61,7 +61,8 @@
.imdbRating,
.rottenTomatoesRating,
.traktRating,
.runtime {
.runtime,
.year {
composes: cell;
flex: 0 0 90px;

View File

@@ -28,6 +28,7 @@ interface CssExports {
'studio': string;
'tmdbRating': string;
'traktRating': string;
'year': string;
}
export const cssExports: CssExports;
export default cssExports;

View File

@@ -167,6 +167,14 @@ class DiscoverMovieRow extends Component {
);
}
if (name === 'year') {
return (
<VirtualTableRowCell key={name} className={styles[name]}>
{year}
</VirtualTableRowCell>
);
}
if (name === 'collection') {
return (
<VirtualTableRowCell

View File

@@ -133,6 +133,12 @@ export const defaultState = {
isSortable: true,
isVisible: true
},
{
name: 'year',
label: () => translate('Year'),
isSortable: true,
isVisible: false
},
{
name: 'inCinemas',
label: () => translate('InCinemas'),