From 76dbab939ccc87b3656e9813bfd036aa5d640aad Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Mon, 11 Mar 2013 21:46:46 -0400 Subject: fixes #15 - SortRemoveWords config change not working --- MediaBrowser.Controller/Entities/TV/Episode.cs | 9 +++++++++ MediaBrowser.Controller/Entities/TV/Season.cs | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'MediaBrowser.Controller/Entities/TV') diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index 854b9d0183..1ec3e97a9f 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()); } } + /// + /// Creates the name of the sort. + /// + /// System.String. + protected override string CreateSortName() + { + return (ParentIndexNumber != null ? ParentIndexNumber.Value.ToString("000-") : "") + + (IndexNumber != null ? IndexNumber.Value.ToString("0000 - ") : "") + Name; + } } } diff --git a/MediaBrowser.Controller/Entities/TV/Season.cs b/MediaBrowser.Controller/Entities/TV/Season.cs index f0a696df1f..20c2ee1fed 100644 --- a/MediaBrowser.Controller/Entities/TV/Season.cs +++ b/MediaBrowser.Controller/Entities/TV/Season.cs @@ -138,5 +138,14 @@ namespace MediaBrowser.Controller.Entities.TV return args; } + + /// + /// Creates the name of the sort. + /// + /// System.String. + protected override string CreateSortName() + { + return IndexNumber != null ? IndexNumber.Value.ToString("0000") : Name; + } } } -- cgit v1.2.3