diff options
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/Configuration/ServerConfiguration.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/MediaSourceInfo.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Entities/MediaAttachment.cs | 50 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/QueryResult.cs | 6 |
5 files changed, 68 insertions, 6 deletions
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index b8abe49e3e..cf6d9c2f6c 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -172,16 +172,18 @@ namespace MediaBrowser.Model.Configuration if (string.IsNullOrWhiteSpace(value)) { // If baseUrl is empty, set an empty prefix string - value = string.Empty; + _baseUrl = string.Empty; + return; } - else if (!value.StartsWith("/")) + + if (value[0] != '/') { // If baseUrl was not configured with a leading slash, append one for consistency value = "/" + value; } // Normalize the end of the string - if (value.EndsWith("/")) + if (value[value.Length - 1] == '/') { // If baseUrl was configured with a trailing slash, remove it for consistency value = value.Remove(value.Length - 1); @@ -231,7 +233,6 @@ namespace MediaBrowser.Model.Configuration LocalNetworkSubnets = Array.Empty<string>(); LocalNetworkAddresses = Array.Empty<string>(); CodecsUsed = Array.Empty<string>(); - ImageExtractionTimeoutMs = 0; PathSubstitutions = Array.Empty<PathSubstitution>(); IgnoreVirtualInterfaces = false; EnableSimpleArtistDetection = true; diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index 5bdc4809a9..5cb0565666 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -57,6 +57,8 @@ namespace MediaBrowser.Model.Dto public List<MediaStream> MediaStreams { get; set; } + public IReadOnlyList<MediaAttachment> MediaAttachments { get; set; } + public string[] Formats { get; set; } public int? Bitrate { get; set; } diff --git a/MediaBrowser.Model/Entities/MediaAttachment.cs b/MediaBrowser.Model/Entities/MediaAttachment.cs new file mode 100644 index 0000000000..8f8c3efd20 --- /dev/null +++ b/MediaBrowser.Model/Entities/MediaAttachment.cs @@ -0,0 +1,50 @@ +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Class MediaAttachment + /// </summary> + public class MediaAttachment + { + /// <summary> + /// Gets or sets the codec. + /// </summary> + /// <value>The codec.</value> + public string Codec { get; set; } + + /// <summary> + /// Gets or sets the codec tag. + /// </summary> + /// <value>The codec tag.</value> + public string CodecTag { get; set; } + + /// <summary> + /// Gets or sets the comment. + /// </summary> + /// <value>The comment.</value> + public string Comment { get; set; } + + /// <summary> + /// Gets or sets the index. + /// </summary> + /// <value>The index.</value> + public int Index { get; set; } + + /// <summary> + /// Gets or sets the filename. + /// </summary> + /// <value>The filename.</value> + public string FileName { get; set; } + + /// <summary> + /// Gets or sets the MIME type. + /// </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; } + } +} diff --git a/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs b/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs index 962f4d2fe3..c382b20c9a 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs @@ -1,12 +1,15 @@ +using System; +using System.Collections.Generic; + namespace MediaBrowser.Model.MediaInfo { public class SubtitleTrackInfo { - public SubtitleTrackEvent[] TrackEvents { get; set; } + public IReadOnlyList<SubtitleTrackEvent> TrackEvents { get; set; } public SubtitleTrackInfo() { - TrackEvents = new SubtitleTrackEvent[] { }; + TrackEvents = Array.Empty<SubtitleTrackEvent>(); } } } diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs index c007a45d6e..221645afbf 100644 --- a/MediaBrowser.Model/Querying/QueryResult.cs +++ b/MediaBrowser.Model/Querying/QueryResult.cs @@ -17,6 +17,12 @@ namespace MediaBrowser.Model.Querying /// <value>The total record count.</value> public int TotalRecordCount { get; set; } + /// <summary> + /// The index of the first record in Items. + /// </summary> + /// <value>First record index.</value> + public int StartIndex { get; set; } + public QueryResult() { Items = Array.Empty<T>(); |
