diff --git a/MediaBrowser.Controller/Dto/DtoBuilder.cs b/MediaBrowser.Controller/Dto/DtoBuilder.cs index 2d8cd5f08..558c19049 100644 --- a/MediaBrowser.Controller/Dto/DtoBuilder.cs +++ b/MediaBrowser.Controller/Dto/DtoBuilder.cs @@ -444,6 +444,14 @@ namespace MediaBrowser.Controller.Dto } } + // Add EpisodeInfo + var episode = item as Episode; + + if (episode != null) + { + dto.IndexNumberEnd = episode.IndexNumberEnd; + } + if (fields.Contains(ItemFields.SeriesInfo)) { // Add SeriesInfo @@ -456,9 +464,6 @@ namespace MediaBrowser.Controller.Dto dto.Status = series.Status; } - // Add EpisodeInfo - var episode = item as Episode; - if (episode != null) { series = item.FindParent(); diff --git a/MediaBrowser.Model/DTO/BaseItemDto.cs b/MediaBrowser.Model/DTO/BaseItemDto.cs index 076fa7bfc..e2280f217 100644 --- a/MediaBrowser.Model/DTO/BaseItemDto.cs +++ b/MediaBrowser.Model/DTO/BaseItemDto.cs @@ -120,6 +120,12 @@ namespace MediaBrowser.Model.Dto /// The index number. public int? IndexNumber { get; set; } + /// + /// Gets or sets the index number end. + /// + /// The index number end. + public int? IndexNumberEnd { get; set; } + /// /// Gets or sets the parent index number. /// diff --git a/MediaBrowser.Server.Implementations/BdInfo/BdInfoExaminer.cs b/MediaBrowser.Server.Implementations/BdInfo/BdInfoExaminer.cs index f33682f12..6668c5f1c 100644 --- a/MediaBrowser.Server.Implementations/BdInfo/BdInfoExaminer.cs +++ b/MediaBrowser.Server.Implementations/BdInfo/BdInfoExaminer.cs @@ -95,15 +95,15 @@ namespace MediaBrowser.Server.Implementations.BdInfo private void AddVideoStream(List streams, TSVideoStream videoStream) { var mediaStream = new MediaStream - { - BitRate = Convert.ToInt32(videoStream.BitRate), - Width = videoStream.Width, - Height = videoStream.Height, - Codec = videoStream.CodecShortName, - ScanType = videoStream.IsInterlaced ? "interlaced" : "progressive", - Type = MediaStreamType.Video, - Index = streams.Count - }; + { + BitRate = Convert.ToInt32(videoStream.BitRate), + Width = videoStream.Width, + Height = videoStream.Height, + Codec = videoStream.CodecShortName, + ScanType = videoStream.IsInterlaced ? "interlaced" : "progressive", + Type = MediaStreamType.Video, + Index = streams.Count + }; if (videoStream.FrameRateDenominator > 0) { @@ -124,15 +124,15 @@ namespace MediaBrowser.Server.Implementations.BdInfo private void AddAudioStream(List streams, TSAudioStream audioStream) { streams.Add(new MediaStream - { - BitRate = Convert.ToInt32(audioStream.BitRate), - Codec = audioStream.CodecShortName, - Language = audioStream.LanguageCode, - Channels = audioStream.ChannelCount, - SampleRate = audioStream.SampleRate, - Type = MediaStreamType.Audio, - Index = streams.Count - }); + { + BitRate = Convert.ToInt32(audioStream.BitRate), + Codec = audioStream.CodecShortName, + Language = audioStream.LanguageCode, + Channels = audioStream.ChannelCount, + SampleRate = audioStream.SampleRate, + Type = MediaStreamType.Audio, + Index = streams.Count + }); } /// @@ -143,12 +143,12 @@ namespace MediaBrowser.Server.Implementations.BdInfo private void AddSubtitleStream(List streams, TSTextStream textStream) { streams.Add(new MediaStream - { - Language = textStream.LanguageCode, - Codec = textStream.CodecShortName, - Type = MediaStreamType.Subtitle, - Index = streams.Count - }); + { + Language = textStream.LanguageCode, + Codec = textStream.CodecShortName, + Type = MediaStreamType.Subtitle, + Index = streams.Count + }); } ///