aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-06 23:56:45 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-03-06 23:56:45 -0500
commita8296cba37357a476b279bccd8d085ce123c600a (patch)
tree6e147ecd0e875a13d5fc244e70a2f66b9bd29417 /MediaBrowser.Model
parentf7e9e9f7a5da3c5fcd0e52d53c9e0daabae8b8ef (diff)
update recording stop
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs19
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs3
-rw-r--r--MediaBrowser.Model/Session/PlaybackStopInfo.cs9
3 files changed, 25 insertions, 6 deletions
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 7d7360759..665da030d 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -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;
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index 79ee1b5c5..69733cefb 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -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;
}
diff --git a/MediaBrowser.Model/Session/PlaybackStopInfo.cs b/MediaBrowser.Model/Session/PlaybackStopInfo.cs
index 80d719f03..3b4ac36a7 100644
--- a/MediaBrowser.Model/Session/PlaybackStopInfo.cs
+++ b/MediaBrowser.Model/Session/PlaybackStopInfo.cs
@@ -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; }
}
} \ No newline at end of file