1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-19 17:32:38 +01:00

Fixed: Sorting by movie title in Blocklist and History

Fixes #9234
This commit is contained in:
Bogdan 2023-10-05 01:02:35 +03:00
parent 2bea61bae5
commit cb2bed93cb
5 changed files with 8 additions and 5 deletions

View File

@ -82,7 +82,7 @@ class BlocklistRow extends Component {
return null; return null;
} }
if (name === 'movies.sortTitle') { if (name === 'movieMetadata.sortTitle') {
return ( return (
<TableRowCell key={name}> <TableRowCell key={name}>
<MovieTitleLink <MovieTitleLink

View File

@ -99,7 +99,7 @@ class HistoryRow extends Component {
); );
} }
if (name === 'movies.sortTitle') { if (name === 'movieMetadata.sortTitle') {
return ( return (
<TableRowCell key={name}> <TableRowCell key={name}>
<MovieTitleLink <MovieTitleLink

View File

@ -32,7 +32,7 @@ export const defaultState = {
columns: [ columns: [
{ {
name: 'movies.sortTitle', name: 'movieMetadata.sortTitle',
label: () => translate('MovieTitle'), label: () => translate('MovieTitle'),
isSortable: true, isSortable: true,
isVisible: true isVisible: true

View File

@ -37,7 +37,7 @@ export const defaultState = {
isModifiable: false isModifiable: false
}, },
{ {
name: 'movies.sortTitle', name: 'movieMetadata.sortTitle',
label: () => translate('Movie'), label: () => translate('Movie'),
isSortable: true, isSortable: true,
isVisible: true isVisible: true

View File

@ -48,7 +48,10 @@ public void DeleteForMovies(List<int> movieIds)
Delete(x => movieIds.Contains(x.MovieId)); Delete(x => movieIds.Contains(x.MovieId));
} }
protected override SqlBuilder PagedBuilder() => new SqlBuilder(_database.DatabaseType).Join<Blocklist, Movie>((b, m) => b.MovieId == m.Id); protected override SqlBuilder PagedBuilder() => new SqlBuilder(_database.DatabaseType)
.Join<Blocklist, Movie>((b, m) => b.MovieId == m.Id)
.LeftJoin<Movie, MovieMetadata>((m, mm) => m.MovieMetadataId == mm.Id);
protected override IEnumerable<Blocklist> PagedQuery(SqlBuilder sql) => _database.QueryJoined<Blocklist, Movie>(sql, (bl, movie) => protected override IEnumerable<Blocklist> PagedQuery(SqlBuilder sql) => _database.QueryJoined<Blocklist, Movie>(sql, (bl, movie) =>
{ {
bl.Movie = movie; bl.Movie = movie;