diff options
| author | Andrew Mahone <andrew.mahone@gmail.com> | 2019-10-18 07:59:03 -0400 |
|---|---|---|
| committer | Andrew Mahone <andrew.mahone@gmail.com> | 2019-10-22 11:54:59 -0400 |
| commit | 01b1c847e95c28ec780dfe3f2c7d1b33ffd08bd0 (patch) | |
| tree | b79d5bd73759f3807e0a2632d1e1f57b17e0dcac | |
| parent | 8c89d8993269033931fb53b66212e4f87c6edbb5 (diff) | |
Provide delivery URLs for attachments in PlaybackInfo.
| -rw-r--r-- | MediaBrowser.Api/Playback/MediaInfoService.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Model/Entities/MediaAttachment.cs | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.cs index da8f99a3d..6c57e37a1 100644 --- a/MediaBrowser.Api/Playback/MediaInfoService.cs +++ b/MediaBrowser.Api/Playback/MediaInfoService.cs @@ -524,6 +524,14 @@ namespace MediaBrowser.Api.Playback SetDeviceSpecificSubtitleInfo(streamInfo, mediaSource, auth.Token); } } + + foreach (var attachment in mediaSource.MediaAttachments) + { + attachment.DeliveryUrl = string.Format("/Videos/{0}/{1}/Attachments/{2}/Attachment", + item.Id, + mediaSource.Id, + attachment.Index); + } } private long? GetMaxBitrate(long? clientMaxBitrate, User user) diff --git a/MediaBrowser.Model/Entities/MediaAttachment.cs b/MediaBrowser.Model/Entities/MediaAttachment.cs index daabbe91d..26279b72b 100644 --- a/MediaBrowser.Model/Entities/MediaAttachment.cs +++ b/MediaBrowser.Model/Entities/MediaAttachment.cs @@ -40,5 +40,11 @@ namespace MediaBrowser.Model.Entities /// </summary> /// <value>The MIME type.</value> public string MIMEType { get; set; } + + /// <summary> + /// Gets or sets the delivery URL. + /// </summary> + /// <value>The delivery URL.</value> + public string DeliveryUrl { get; set; } } } |
