mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-17 10:45:49 +02:00
Fixed: Sorting on Series Title now ignores articles (a/an/the).
This commit is contained in:
parent
fd5e8a5166
commit
221a457f3a
@ -28,7 +28,7 @@ private PagingResource<BlacklistResource> GetBlacklist(PagingResource<BlacklistR
|
||||
//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 @@ private PagingResource<HistoryResource> GetHistory(PagingResource<HistoryResourc
|
||||
//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 @@ private PagingResource<EpisodeResource> GetCutoffUnmetEpisodes(PagingResource<Ep
|
||||
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 @@ private PagingResource<EpisodeResource> GetMissingEpisodes(PagingResource<Episod
|
||||
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;
|
||||
|
@ -35,33 +35,33 @@ define(
|
||||
columns:
|
||||
[
|
||||
{
|
||||
name : 'series',
|
||||
label: 'Series',
|
||||
cell : SeriesTitleCell,
|
||||
sortValue: 'series.title'
|
||||
name : 'series',
|
||||
label : 'Series',
|
||||
cell : SeriesTitleCell,
|
||||
sortValue : 'series.sortTitle'
|
||||
},
|
||||
{
|
||||
name : 'sourceTitle',
|
||||
label: 'Source Title',
|
||||
cell : 'string',
|
||||
sortValue: 'sourceTitle'
|
||||
name : 'sourceTitle',
|
||||
label : 'Source Title',
|
||||
cell : 'string',
|
||||
sortValue : 'sourceTitle'
|
||||
},
|
||||
{
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
cell : QualityCell,
|
||||
sortable: false
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
cell : QualityCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'date',
|
||||
label: 'Date',
|
||||
cell : RelativeDateCell
|
||||
name : 'date',
|
||||
label : 'Date',
|
||||
cell : RelativeDateCell
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : '',
|
||||
cell : BlacklistActionsCell,
|
||||
sortable: false
|
||||
name : 'this',
|
||||
label : '',
|
||||
cell : BlacklistActionsCell,
|
||||
sortable : false
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -32,33 +32,34 @@ define(
|
||||
columns:
|
||||
[
|
||||
{
|
||||
name : 'status',
|
||||
label: '',
|
||||
cell : QueueStatusCell,
|
||||
cellValue: 'this'
|
||||
name : 'status',
|
||||
label : '',
|
||||
cell : QueueStatusCell,
|
||||
cellValue : 'this'
|
||||
},
|
||||
{
|
||||
name : 'series',
|
||||
label: 'Series',
|
||||
cell : SeriesTitleCell
|
||||
name : 'series',
|
||||
label : 'Series',
|
||||
cell : SeriesTitleCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode',
|
||||
sortable: false,
|
||||
cell : EpisodeNumberCell
|
||||
name : 'episode',
|
||||
label : 'Episode',
|
||||
cell : EpisodeNumberCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode Title',
|
||||
sortable: false,
|
||||
cell : EpisodeTitleCell
|
||||
name : 'episode',
|
||||
label : 'Episode Title',
|
||||
cell : EpisodeTitleCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
cell : QualityCell,
|
||||
sortable: false
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
cell : QualityCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'timeleft',
|
||||
|
@ -39,45 +39,45 @@ define(
|
||||
columns:
|
||||
[
|
||||
{
|
||||
name : 'eventType',
|
||||
label : '',
|
||||
cell : EventTypeCell,
|
||||
cellValue: 'this'
|
||||
name : 'eventType',
|
||||
label : '',
|
||||
cell : EventTypeCell,
|
||||
cellValue : 'this'
|
||||
},
|
||||
{
|
||||
name : 'series',
|
||||
label: 'Series',
|
||||
cell : SeriesTitleCell,
|
||||
sortValue: 'series.title'
|
||||
name : 'series',
|
||||
label : 'Series',
|
||||
cell : SeriesTitleCell,
|
||||
sortValue : 'series.sortTitle'
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode',
|
||||
sortable: false,
|
||||
cell : EpisodeNumberCell
|
||||
name : 'episode',
|
||||
label : 'Episode',
|
||||
cell : EpisodeNumberCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode Title',
|
||||
sortable: false,
|
||||
cell : EpisodeTitleCell
|
||||
name : 'episode',
|
||||
label : 'Episode Title',
|
||||
cell : EpisodeTitleCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
cell : QualityCell,
|
||||
sortable: false
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
cell : QualityCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'date',
|
||||
label: 'Date',
|
||||
cell : RelativeDateCell
|
||||
name : 'date',
|
||||
label : 'Date',
|
||||
cell : RelativeDateCell
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : '',
|
||||
cell : HistoryDetailsCell,
|
||||
sortable: false
|
||||
name : 'this',
|
||||
label : '',
|
||||
cell : HistoryDetailsCell,
|
||||
sortable : false
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -57,25 +57,26 @@ define(
|
||||
cell : SeriesStatusCell
|
||||
},
|
||||
{
|
||||
name : 'title',
|
||||
label : 'Title',
|
||||
cell : SeriesTitleCell,
|
||||
cellValue: 'this'
|
||||
name : 'title',
|
||||
label : 'Title',
|
||||
cell : SeriesTitleCell,
|
||||
cellValue : 'this',
|
||||
sortValue : 'sortTitle'
|
||||
},
|
||||
{
|
||||
name : 'qualityProfileId',
|
||||
label: 'Quality',
|
||||
cell : QualityProfileCell
|
||||
name : 'qualityProfileId',
|
||||
label : 'Quality',
|
||||
cell : QualityProfileCell
|
||||
},
|
||||
{
|
||||
name : 'seasonFolder',
|
||||
label: 'Season Folder',
|
||||
cell : SeasonFolderCell
|
||||
name : 'seasonFolder',
|
||||
label : 'Season Folder',
|
||||
cell : SeasonFolderCell
|
||||
},
|
||||
{
|
||||
name : 'path',
|
||||
label: 'Path',
|
||||
cell : 'string'
|
||||
name : 'path',
|
||||
label : 'Path',
|
||||
cell : 'string'
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -53,25 +53,26 @@ define(
|
||||
cell : SeriesStatusCell
|
||||
},
|
||||
{
|
||||
name : 'title',
|
||||
label : 'Title',
|
||||
cell : SeriesTitleCell,
|
||||
cellValue: 'this'
|
||||
name : 'title',
|
||||
label : 'Title',
|
||||
cell : SeriesTitleCell,
|
||||
cellValue : 'this',
|
||||
sortValue : 'sortTitle'
|
||||
},
|
||||
{
|
||||
name : 'seasonCount',
|
||||
label: 'Seasons',
|
||||
cell : 'integer'
|
||||
name : 'seasonCount',
|
||||
label : 'Seasons',
|
||||
cell : 'integer'
|
||||
},
|
||||
{
|
||||
name : 'qualityProfileId',
|
||||
label: 'Quality',
|
||||
cell : QualityProfileCell
|
||||
name : 'qualityProfileId',
|
||||
label : 'Quality',
|
||||
cell : QualityProfileCell
|
||||
},
|
||||
{
|
||||
name : 'network',
|
||||
label: 'Network',
|
||||
cell : 'string'
|
||||
name : 'network',
|
||||
label : 'Network',
|
||||
cell : 'string'
|
||||
},
|
||||
{
|
||||
name : 'nextAiring',
|
||||
@ -80,16 +81,16 @@ define(
|
||||
sortValue : SeriesCollection.nextAiring
|
||||
},
|
||||
{
|
||||
name : 'percentOfEpisodes',
|
||||
label : 'Episodes',
|
||||
cell : EpisodeProgressCell,
|
||||
className: 'episode-progress-cell'
|
||||
name : 'percentOfEpisodes',
|
||||
label : 'Episodes',
|
||||
cell : EpisodeProgressCell,
|
||||
className : 'episode-progress-cell'
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : '',
|
||||
sortable: false,
|
||||
cell : SeriesActionsCell
|
||||
name : 'this',
|
||||
label : '',
|
||||
sortable : false,
|
||||
cell : SeriesActionsCell
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -45,39 +45,39 @@ define([
|
||||
|
||||
columns : [
|
||||
{
|
||||
name : '',
|
||||
cell : 'select-row',
|
||||
headerCell : 'select-all',
|
||||
sortable : false
|
||||
name : '',
|
||||
cell : 'select-row',
|
||||
headerCell: 'select-all',
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'series',
|
||||
label : 'Series Title',
|
||||
sortable : false,
|
||||
cell : SeriesTitleCell
|
||||
name : 'series',
|
||||
label : 'Series Title',
|
||||
cell : SeriesTitleCell,
|
||||
sortValue : 'series.sortTitle'
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : 'Episode',
|
||||
sortable : false,
|
||||
cell : EpisodeNumberCell
|
||||
name : 'this',
|
||||
label : 'Episode',
|
||||
cell : EpisodeNumberCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : 'Episode Title',
|
||||
sortable : false,
|
||||
cell : EpisodeTitleCell
|
||||
name : 'this',
|
||||
label : 'Episode Title',
|
||||
cell : EpisodeTitleCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'airDateUtc',
|
||||
label : 'Air Date',
|
||||
cell : RelativeDateCell
|
||||
name : 'airDateUtc',
|
||||
label : 'Air Date',
|
||||
cell : RelativeDateCell
|
||||
},
|
||||
{
|
||||
name : 'status',
|
||||
label : 'Status',
|
||||
cell : EpisodeStatusCell,
|
||||
sortable : false
|
||||
name : 'status',
|
||||
label : 'Status',
|
||||
cell : EpisodeStatusCell,
|
||||
sortable : false
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -45,39 +45,39 @@ define([
|
||||
|
||||
columns : [
|
||||
{
|
||||
name : '',
|
||||
cell : 'select-row',
|
||||
headerCell : 'select-all',
|
||||
sortable : false
|
||||
name : '',
|
||||
cell : 'select-row',
|
||||
headerCell: 'select-all',
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'series',
|
||||
label : 'Series Title',
|
||||
sortable : false,
|
||||
cell : SeriesTitleCell
|
||||
name : 'series',
|
||||
label : 'Series Title',
|
||||
cell : SeriesTitleCell,
|
||||
sortValue : 'series.sortTitle'
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : 'Episode',
|
||||
sortable : false,
|
||||
cell : EpisodeNumberCell
|
||||
name : 'this',
|
||||
label : 'Episode',
|
||||
cell : EpisodeNumberCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : 'Episode Title',
|
||||
sortable : false,
|
||||
cell : EpisodeTitleCell
|
||||
name : 'this',
|
||||
label : 'Episode Title',
|
||||
cell : EpisodeTitleCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'airDateUtc',
|
||||
label : 'Air Date',
|
||||
cell : RelativeDateCell
|
||||
name : 'airDateUtc',
|
||||
label : 'Air Date',
|
||||
cell : RelativeDateCell
|
||||
},
|
||||
{
|
||||
name : 'status',
|
||||
label : 'Status',
|
||||
cell : EpisodeStatusCell,
|
||||
sortable : false
|
||||
name : 'status',
|
||||
label : 'Status',
|
||||
cell : EpisodeStatusCell,
|
||||
sortable : false
|
||||
}
|
||||
],
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user