mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-27 18:10:54 +01:00
add faster access to series sort name
This commit is contained in:
@@ -53,7 +53,16 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
/// This is the ending episode number for double episodes.
|
||||
/// </summary>
|
||||
/// <value>The index number.</value>
|
||||
public int? IndexNumberEnd { get; set; }
|
||||
public int? IndexNumberEnd { get; set; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public string SeriesSortName { get; set; }
|
||||
|
||||
public string FindSeriesSortName()
|
||||
{
|
||||
var series = Series;
|
||||
return series == null ? SeriesSortName : series.SortName;
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
protected override bool SupportsOwnedItems
|
||||
|
||||
@@ -51,6 +51,15 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public string SeriesSortName { get; set; }
|
||||
|
||||
public string FindSeriesSortName()
|
||||
{
|
||||
var series = Series;
|
||||
return series == null ? SeriesSortName : series.SortName;
|
||||
}
|
||||
|
||||
// Genre, Rating and Stuido will all be the same
|
||||
protected override IEnumerable<string> GetIndexByOptions()
|
||||
{
|
||||
|
||||
@@ -449,13 +449,8 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!episode.ParentIndexNumber.HasValue)
|
||||
{
|
||||
var season = episode.Season;
|
||||
return season != null && string.Equals(GetUniqueSeriesKey(season), seasonPresentationKey, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
return false;
|
||||
var season = episode.Season;
|
||||
return season != null && string.Equals(GetUniqueSeriesKey(season), seasonPresentationKey, StringComparison.OrdinalIgnoreCase);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user