aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/TV/Episode.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/TV/Episode.cs')
-rw-r--r--MediaBrowser.Controller/Entities/TV/Episode.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs
index 854b9d018..1ec3e97a9 100644
--- a/MediaBrowser.Controller/Entities/TV/Episode.cs
+++ b/MediaBrowser.Controller/Entities/TV/Episode.cs
@@ -159,5 +159,14 @@ namespace MediaBrowser.Controller.Entities.TV
get { return _season ?? (_season = FindParent<Season>()); }
}
+ /// <summary>
+ /// Creates the name of the sort.
+ /// </summary>
+ /// <returns>System.String.</returns>
+ protected override string CreateSortName()
+ {
+ return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("000-") : "")
+ + (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name;
+ }
}
}