fixes #286 - Support double episodes
This commit is contained in:
parent
3e656f5a37
commit
dd3f6fcc26
|
@ -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<Series>();
|
||||
|
|
|
@ -120,6 +120,12 @@ namespace MediaBrowser.Model.Dto
|
|||
/// <value>The index number.</value>
|
||||
public int? IndexNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the index number end.
|
||||
/// </summary>
|
||||
/// <value>The index number end.</value>
|
||||
public int? IndexNumberEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent index number.
|
||||
/// </summary>
|
||||
|
|
|
@ -95,15 +95,15 @@ namespace MediaBrowser.Server.Implementations.BdInfo
|
|||
private void AddVideoStream(List<MediaStream> 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<MediaStream> 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
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -143,12 +143,12 @@ namespace MediaBrowser.Server.Implementations.BdInfo
|
|||
private void AddSubtitleStream(List<MediaStream> 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
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue
Block a user