mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
update sortname generation
This commit is contained in:
parent
8da3a3680c
commit
3c82d8540b
@ -131,7 +131,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
|||||||
/// Creates the name of the sort.
|
/// Creates the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
protected override string CreateSortName()
|
protected override string CreateSortNameInternal()
|
||||||
{
|
{
|
||||||
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("0000 - ") : "")
|
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("0000 - ") : "")
|
||||||
+ (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
|
+ (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
|
||||||
|
@ -689,14 +689,22 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
return System.IO.Path.Combine(basePath, idString.Substring(0, 2), idString);
|
return System.IO.Path.Combine(basePath, idString.Substring(0, 2), idString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected string CreateSortName()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(Name))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return CreateSortNameInternal();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the name of the sort.
|
/// Creates the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
protected virtual string CreateSortName()
|
protected virtual string CreateSortNameInternal()
|
||||||
{
|
{
|
||||||
if (Name == null) return null; //some items may not have name filled in properly
|
|
||||||
|
|
||||||
if (!EnableAlphaNumericSorting)
|
if (!EnableAlphaNumericSorting)
|
||||||
{
|
{
|
||||||
return Name.TrimStart();
|
return Name.TrimStart();
|
||||||
|
@ -237,7 +237,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
/// Creates the name of the sort.
|
/// Creates the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
protected override string CreateSortName()
|
protected override string CreateSortNameInternal()
|
||||||
{
|
{
|
||||||
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("000 - ") : "")
|
return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("000 - ") : "")
|
||||||
+ (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
|
+ (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
|
||||||
|
@ -145,7 +145,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
/// Creates the name of the sort.
|
/// Creates the name of the sort.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
protected override string CreateSortName()
|
protected override string CreateSortNameInternal()
|
||||||
{
|
{
|
||||||
return IndexNumber != null ? IndexNumber.Value.ToString("0000") : Name;
|
return IndexNumber != null ? IndexNumber.Value.ToString("0000") : Name;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ namespace MediaBrowser.Controller.LiveTv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string CreateSortName()
|
protected override string CreateSortNameInternal()
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(Number))
|
if (!string.IsNullOrEmpty(Number))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user