Fixed: Sorting on Series Title now ignores articles (a/an/the).

pull/84/head
Taloth Saldono 10 years ago
parent fd5e8a5166
commit 221a457f3a

@ -28,7 +28,7 @@ namespace NzbDrone.Api.Blacklist
//This is a hack to deal with backgrid setting the sortKey to the column name instead of sortValue
if (pagingSpec.SortKey.Equals("series", StringComparison.InvariantCultureIgnoreCase))
{
pagingSpec.SortKey = "series.title";
pagingSpec.SortKey = "series.sortTitle";
}
return ApplyToPage(_blacklistService.Paged, pagingSpec);

@ -36,7 +36,7 @@ namespace NzbDrone.Api.History
//This is a hack to deal with backgrid setting the sortKey to the column name instead of sortValue
if (pagingSpec.SortKey.Equals("series", StringComparison.InvariantCultureIgnoreCase))
{
pagingSpec.SortKey = "series.title";
pagingSpec.SortKey = "series.sortTitle";
}
if (pagingResource.FilterKey == "eventType")

@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using NzbDrone.Api.Episodes;
using NzbDrone.Api.Extensions;
using NzbDrone.Core.Datastore;
@ -30,6 +31,12 @@ namespace NzbDrone.Api.Wanted
SortDirection = pagingResource.SortDirection
};
//This is a hack to deal with backgrid setting the sortKey to the column name instead of sortValue
if (pagingSpec.SortKey.Equals("series", StringComparison.InvariantCultureIgnoreCase))
{
pagingSpec.SortKey = "series.sortTitle";
}
if (pagingResource.FilterKey == "monitored" && pagingResource.FilterValue == "false")
{
pagingSpec.FilterExpression = v => v.Monitored == false || v.Series.Monitored == false;

@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using NzbDrone.Api.Episodes;
using NzbDrone.Api.Extensions;
using NzbDrone.Core.Datastore;
@ -30,6 +31,12 @@ namespace NzbDrone.Api.Wanted
SortDirection = pagingResource.SortDirection
};
//This is a hack to deal with backgrid setting the sortKey to the column name instead of sortValue
if (pagingSpec.SortKey.Equals("series", StringComparison.InvariantCultureIgnoreCase))
{
pagingSpec.SortKey = "series.sortTitle";
}
if (pagingResource.FilterKey == "monitored" && pagingResource.FilterValue == "false")
{
pagingSpec.FilterExpression = v => v.Monitored == false || v.Series.Monitored == false;

@ -38,7 +38,7 @@ define(
name : 'series',
label : 'Series',
cell : SeriesTitleCell,
sortValue: 'series.title'
sortValue : 'series.sortTitle'
},
{
name : 'sourceTitle',

@ -40,19 +40,20 @@ define(
{
name : 'series',
label : 'Series',
cell : SeriesTitleCell
cell : SeriesTitleCell,
sortable : false
},
{
name : 'episode',
label : 'Episode',
sortable: false,
cell : EpisodeNumberCell
cell : EpisodeNumberCell,
sortable : false
},
{
name : 'episode',
label : 'Episode Title',
sortable: false,
cell : EpisodeTitleCell
cell : EpisodeTitleCell,
sortable : false
},
{
name : 'quality',

@ -48,19 +48,19 @@ define(
name : 'series',
label : 'Series',
cell : SeriesTitleCell,
sortValue: 'series.title'
sortValue : 'series.sortTitle'
},
{
name : 'episode',
label : 'Episode',
sortable: false,
cell : EpisodeNumberCell
cell : EpisodeNumberCell,
sortable : false
},
{
name : 'episode',
label : 'Episode Title',
sortable: false,
cell : EpisodeTitleCell
cell : EpisodeTitleCell,
sortable : false
},
{
name : 'quality',

@ -60,7 +60,8 @@ define(
name : 'title',
label : 'Title',
cell : SeriesTitleCell,
cellValue: 'this'
cellValue : 'this',
sortValue : 'sortTitle'
},
{
name : 'qualityProfileId',

@ -56,7 +56,8 @@ define(
name : 'title',
label : 'Title',
cell : SeriesTitleCell,
cellValue: 'this'
cellValue : 'this',
sortValue : 'sortTitle'
},
{
name : 'seasonCount',

@ -53,20 +53,20 @@ define([
{
name : 'series',
label : 'Series Title',
sortable : false,
cell : SeriesTitleCell
cell : SeriesTitleCell,
sortValue : 'series.sortTitle'
},
{
name : 'this',
label : 'Episode',
sortable : false,
cell : EpisodeNumberCell
cell : EpisodeNumberCell,
sortable : false
},
{
name : 'this',
label : 'Episode Title',
sortable : false,
cell : EpisodeTitleCell
cell : EpisodeTitleCell,
sortable : false
},
{
name : 'airDateUtc',

@ -53,20 +53,20 @@ define([
{
name : 'series',
label : 'Series Title',
sortable : false,
cell : SeriesTitleCell
cell : SeriesTitleCell,
sortValue : 'series.sortTitle'
},
{
name : 'this',
label : 'Episode',
sortable : false,
cell : EpisodeNumberCell
cell : EpisodeNumberCell,
sortable : false
},
{
name : 'this',
label : 'Episode Title',
sortable : false,
cell : EpisodeTitleCell
cell : EpisodeTitleCell,
sortable : false
},
{
name : 'airDateUtc',

Loading…
Cancel
Save