update recording stop

This commit is contained in:
Luke Pulverenti
2016-03-06 23:56:45 -05:00
parent f7e9e9f7a5
commit a8296cba37
11 changed files with 86 additions and 41 deletions

View File

@@ -423,7 +423,24 @@ namespace MediaBrowser.Model.Dlna
playlistItem.Container = transcodingProfile.Container;
playlistItem.EstimateContentLength = transcodingProfile.EstimateContentLength;
playlistItem.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo;
playlistItem.AudioCodec = transcodingProfile.AudioCodec.Split(',')[0];
// TODO: We should probably preserve the full list and sent it tp the server that way
string[] supportedAudioCodecs = transcodingProfile.AudioCodec.Split(',');
string inputAudioCodec = audioStream == null ? null : audioStream.Codec;
foreach (string supportedAudioCodec in supportedAudioCodecs)
{
if (StringHelper.EqualsIgnoreCase(supportedAudioCodec, inputAudioCodec))
{
playlistItem.AudioCodec = supportedAudioCodec;
break;
}
}
if (string.IsNullOrEmpty(playlistItem.AudioCodec))
{
playlistItem.AudioCodec = supportedAudioCodecs[0];
}
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
playlistItem.CopyTimestamps = transcodingProfile.CopyTimestamps;
playlistItem.SubProtocol = transcodingProfile.Protocol;

View File

@@ -234,7 +234,8 @@ namespace MediaBrowser.Model.Dlna
}
list.Add(new NameValuePair("CopyTimestamps", (item.CopyTimestamps).ToString().ToLower()));
list.Add(new NameValuePair("SubtitleMethod", item.SubtitleStreamIndex.HasValue && item.SubtitleDeliveryMethod != SubtitleDeliveryMethod.External ? item.SubtitleDeliveryMethod.ToString() : string.Empty));
return list;
}

View File

@@ -12,25 +12,21 @@ namespace MediaBrowser.Model.Session
/// </summary>
/// <value>The item.</value>
public BaseItemInfo Item { get; set; }
/// <summary>
/// Gets or sets the item identifier.
/// </summary>
/// <value>The item identifier.</value>
public string ItemId { get; set; }
/// <summary>
/// Gets or sets the session id.
/// </summary>
/// <value>The session id.</value>
public string SessionId { get; set; }
/// <summary>
/// Gets or sets the media version identifier.
/// </summary>
/// <value>The media version identifier.</value>
public string MediaSourceId { get; set; }
/// <summary>
/// Gets or sets the position ticks.
/// </summary>
@@ -46,5 +42,10 @@ namespace MediaBrowser.Model.Session
/// </summary>
/// <value>The play session identifier.</value>
public string PlaySessionId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="PlaybackStopInfo"/> is failed.
/// </summary>
/// <value><c>true</c> if failed; otherwise, <c>false</c>.</value>
public bool Failed { get; set; }
}
}