Fixed: Blacklist sorting on Series Title no longer causes UI failure.

pull/78/head
Taloth Saldono 11 years ago
parent 344e6b0f9c
commit 326ecf1c14

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using NzbDrone.Api.REST; using NzbDrone.Api.REST;
using NzbDrone.Core.Qualities; using NzbDrone.Core.Qualities;
using NzbDrone.Api.Series;
namespace NzbDrone.Api.Blacklist namespace NzbDrone.Api.Blacklist
{ {
@ -12,5 +13,7 @@ namespace NzbDrone.Api.Blacklist
public string SourceTitle { get; set; } public string SourceTitle { get; set; }
public QualityModel Quality { get; set; } public QualityModel Quality { get; set; }
public DateTime Date { get; set; } public DateTime Date { get; set; }
public SeriesResource Series { get; set; }
} }
} }

@ -2,12 +2,14 @@
using System.Collections.Generic; using System.Collections.Generic;
using NzbDrone.Core.Datastore; using NzbDrone.Core.Datastore;
using NzbDrone.Core.Qualities; using NzbDrone.Core.Qualities;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Blacklisting namespace NzbDrone.Core.Blacklisting
{ {
public class Blacklist : ModelBase public class Blacklist : ModelBase
{ {
public Int32 SeriesId { get; set; } public Int32 SeriesId { get; set; }
public Series Series { get; set; }
public List<Int32> EpisodeIds { get; set; } public List<Int32> EpisodeIds { get; set; }
public String SourceTitle { get; set; } public String SourceTitle { get; set; }
public QualityModel Quality { get; set; } public QualityModel Quality { get; set; }

@ -1,6 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using NzbDrone.Core.Datastore; using NzbDrone.Core.Datastore;
using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Messaging.Events;
using Marr.Data.QGen;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Blacklisting namespace NzbDrone.Core.Blacklisting
{ {
@ -27,5 +29,12 @@ namespace NzbDrone.Core.Blacklisting
{ {
return Query.Where(b => b.SeriesId == seriesId); return Query.Where(b => b.SeriesId == seriesId);
} }
protected override SortBuilder<Blacklist> GetPagedQuery(QueryBuilder<Blacklist> query, PagingSpec<Blacklist> pagingSpec)
{
var baseQuery = query.Join<Blacklist, Series>(JoinType.Inner, h => h.Series, (h, s) => h.SeriesId == s.Id);
return base.GetPagedQuery(baseQuery, pagingSpec);
}
} }
} }

Loading…
Cancel
Save