diff options
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemDto.cs | 66 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/MediaSourceInfo.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/UserDto.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/LiveTv/LiveTvOptions.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaBrowser.Model.csproj | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/IAcceptSocket.cs | 28 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/ISocket.cs | 38 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/ISocketFactory.cs | 16 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/IUdpSocket.cs | 28 | ||||
| -rw-r--r-- | MediaBrowser.Model/Net/MimeTypes.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/ItemFields.cs | 12 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/ItemSortBy.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Model/Session/PlaybackProgressInfo.cs | 4 |
13 files changed, 73 insertions, 141 deletions
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index c78c92967..5122227e1 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -828,72 +828,6 @@ namespace MediaBrowser.Model.Dto } /// <summary> - /// Gets a value indicating whether this instance is audio. - /// </summary> - /// <value><c>true</c> if this instance is audio; otherwise, <c>false</c>.</value> - [IgnoreDataMember] - public bool IsAudio - { - get { return StringHelper.EqualsIgnoreCase(MediaType, Entities.MediaType.Audio); } - } - - /// <summary> - /// Gets a value indicating whether this instance is game. - /// </summary> - /// <value><c>true</c> if this instance is game; otherwise, <c>false</c>.</value> - [IgnoreDataMember] - public bool IsGame - { - get { return StringHelper.EqualsIgnoreCase(MediaType, Entities.MediaType.Game); } - } - - /// <summary> - /// Gets a value indicating whether this instance is person. - /// </summary> - /// <value><c>true</c> if this instance is person; otherwise, <c>false</c>.</value> - [IgnoreDataMember] - public bool IsPerson - { - get { return StringHelper.EqualsIgnoreCase(Type, "Person"); } - } - - [IgnoreDataMember] - public bool IsMusicGenre - { - get { return StringHelper.EqualsIgnoreCase(Type, "MusicGenre"); } - } - - [IgnoreDataMember] - public bool IsGameGenre - { - get { return StringHelper.EqualsIgnoreCase(Type, "GameGenre"); } - } - - [IgnoreDataMember] - public bool IsGenre - { - get { return StringHelper.EqualsIgnoreCase(Type, "Genre"); } - } - - [IgnoreDataMember] - public bool IsArtist - { - get { return StringHelper.EqualsIgnoreCase(Type, "MusicArtist"); } - } - - [IgnoreDataMember] - public bool IsAlbum - { - get { return StringHelper.EqualsIgnoreCase(Type, "MusicAlbum"); } - } - - [IgnoreDataMember] - public bool IsStudio - { - get { return StringHelper.EqualsIgnoreCase(Type, "Studio"); } - } - - /// <summary> /// Gets or sets the program identifier. /// </summary> /// <value>The program identifier.</value> diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index d20911a7f..d416cfd96 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -60,6 +60,8 @@ namespace MediaBrowser.Model.Dto public string TranscodingSubProtocol { get; set; } public string TranscodingContainer { get; set; } + public int? AnalyzeDurationMs { get; set; } + public MediaSourceInfo() { Formats = new List<string>(); diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs index f9e3f7718..37a554166 100644 --- a/MediaBrowser.Model/Dto/UserDto.cs +++ b/MediaBrowser.Model/Dto/UserDto.cs @@ -89,7 +89,9 @@ namespace MediaBrowser.Model.Dto /// </summary> /// <value><c>true</c> if this instance has configured easy password; otherwise, <c>false</c>.</value> public bool HasConfiguredEasyPassword { get; set; } - + + public bool? EnableAutoLogin { get; set; } + /// <summary> /// Gets or sets the last login date. /// </summary> diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs index e2c6b0503..79a484a46 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs @@ -36,6 +36,7 @@ namespace MediaBrowser.Model.LiveTv MediaLocationsCreated = new string[] { }; RecordingEncodingFormat = "mp4"; RecordingPostProcessorArguments = "\"{path}\""; + EnableRecordingEncoding = true; } } diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index b796effa1..67a04c5a1 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -137,9 +137,9 @@ <Compile Include="Dto\NameValuePair.cs" /> <Compile Include="Logging\IConsoleLogger.cs" /> <Compile Include="Net\IpEndPointInfo.cs" /> - <Compile Include="Net\ISocket.cs" /> + <Compile Include="Net\IAcceptSocket.cs" /> <Compile Include="Net\ISocketFactory.cs" /> - <Compile Include="Net\IUdpSocket.cs" /> + <Compile Include="Net\ISocket.cs" /> <Compile Include="Net\SocketReceiveResult.cs" /> <Compile Include="Services\IHttpResult.cs" /> <Compile Include="Social\ISharingRepository.cs" /> diff --git a/MediaBrowser.Model/Net/IAcceptSocket.cs b/MediaBrowser.Model/Net/IAcceptSocket.cs new file mode 100644 index 000000000..cac23b337 --- /dev/null +++ b/MediaBrowser.Model/Net/IAcceptSocket.cs @@ -0,0 +1,28 @@ +using System; + +namespace MediaBrowser.Model.Net +{ + public interface IAcceptSocket : IDisposable + { + bool DualMode { get; } + IpEndPointInfo LocalEndPoint { get; } + IpEndPointInfo RemoteEndPoint { get; } + void Close(); + void Shutdown(bool both); + void Listen(int backlog); + void Bind(IpEndPointInfo endpoint); + void Connect(IpEndPointInfo endPoint); + void StartAccept(Action<IAcceptSocket> onAccept, Func<bool> isClosed); + } + + public class SocketCreateException : Exception + { + public SocketCreateException(string errorCode, Exception originalException) + : base(errorCode, originalException) + { + ErrorCode = errorCode; + } + + public string ErrorCode { get; private set; } + } +} diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs index aed35bce8..90070b128 100644 --- a/MediaBrowser.Model/Net/ISocket.cs +++ b/MediaBrowser.Model/Net/ISocket.cs @@ -1,28 +1,28 @@ using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; namespace MediaBrowser.Model.Net { + /// <summary> + /// Provides a common interface across platforms for UDP sockets used by this SSDP implementation. + /// </summary> public interface ISocket : IDisposable { - bool DualMode { get; } - IpEndPointInfo LocalEndPoint { get; } - IpEndPointInfo RemoteEndPoint { get; } - void Close(); - void Shutdown(bool both); - void Listen(int backlog); - void Bind(IpEndPointInfo endpoint); + IpAddressInfo LocalIPAddress { get; } - void StartAccept(Action<ISocket> onAccept, Func<bool> isClosed); - } - - public class SocketCreateException : Exception - { - public SocketCreateException(string errorCode, Exception originalException) - : base(errorCode, originalException) - { - ErrorCode = errorCode; - } + /// <summary> + /// Waits for and returns the next UDP message sent to this socket (uni or multicast). + /// </summary> + /// <returns></returns> + Task<SocketReceiveResult> ReceiveAsync(CancellationToken cancellationToken); - public string ErrorCode { get; private set; } + /// <summary> + /// Sends a UDP message to a particular end point (uni or multicast). + /// </summary> + Task SendAsync(byte[] buffer, int bytes, IpEndPointInfo endPoint, CancellationToken cancellationToken); } -} +}
\ No newline at end of file diff --git a/MediaBrowser.Model/Net/ISocketFactory.cs b/MediaBrowser.Model/Net/ISocketFactory.cs index ac406e7f1..4b70f3362 100644 --- a/MediaBrowser.Model/Net/ISocketFactory.cs +++ b/MediaBrowser.Model/Net/ISocketFactory.cs @@ -2,7 +2,7 @@ namespace MediaBrowser.Model.Net { /// <summary> - /// Implemented by components that can create a platform specific UDP socket implementation, and wrap it in the cross platform <see cref="IUdpSocket"/> interface. + /// Implemented by components that can create a platform specific UDP socket implementation, and wrap it in the cross platform <see cref="ISocket"/> interface. /// </summary> public interface ISocketFactory { @@ -11,13 +11,15 @@ namespace MediaBrowser.Model.Net /// Createa a new unicast socket using the specified local port number. /// </summary> /// <param name="localPort">The local port to bind to.</param> - /// <returns>A <see cref="IUdpSocket"/> implementation.</returns> - IUdpSocket CreateUdpSocket(int localPort); + /// <returns>A <see cref="ISocket"/> implementation.</returns> + ISocket CreateUdpSocket(int localPort); + + ISocket CreateTcpSocket(IpAddressInfo remoteAddress, int remotePort); /// <summary> /// Createa a new unicast socket using the specified local port number. /// </summary> - IUdpSocket CreateSsdpUdpSocket(IpAddressInfo localIp, int localPort); + ISocket CreateSsdpUdpSocket(IpAddressInfo localIp, int localPort); /// <summary> /// Createa a new multicast socket using the specified multicast IP address, multicast time to live and local port. @@ -25,10 +27,10 @@ namespace MediaBrowser.Model.Net /// <param name="ipAddress">The multicast IP address to bind to.</param> /// <param name="multicastTimeToLive">The multicast time to live value. Actually a maximum number of network hops for UDP packets.</param> /// <param name="localPort">The local port to bind to.</param> - /// <returns>A <see cref="IUdpSocket"/> implementation.</returns> - IUdpSocket CreateUdpMulticastSocket(string ipAddress, int multicastTimeToLive, int localPort); + /// <returns>A <see cref="ISocket"/> implementation.</returns> + ISocket CreateUdpMulticastSocket(string ipAddress, int multicastTimeToLive, int localPort); - ISocket CreateSocket(IpAddressFamily family, SocketType socketType, ProtocolType protocolType, bool dualMode); + IAcceptSocket CreateSocket(IpAddressFamily family, SocketType socketType, ProtocolType protocolType, bool dualMode); } public enum SocketType diff --git a/MediaBrowser.Model/Net/IUdpSocket.cs b/MediaBrowser.Model/Net/IUdpSocket.cs deleted file mode 100644 index 76793f4a6..000000000 --- a/MediaBrowser.Model/Net/IUdpSocket.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace MediaBrowser.Model.Net -{ - /// <summary> - /// Provides a common interface across platforms for UDP sockets used by this SSDP implementation. - /// </summary> - public interface IUdpSocket : IDisposable - { - IpAddressInfo LocalIPAddress { get; } - - /// <summary> - /// Waits for and returns the next UDP message sent to this socket (uni or multicast). - /// </summary> - /// <returns></returns> - Task<SocketReceiveResult> ReceiveAsync(); - - /// <summary> - /// Sends a UDP message to a particular end point (uni or multicast). - /// </summary> - Task SendAsync(byte[] buffer, int bytes, IpEndPointInfo endPoint, CancellationToken cancellationToken); - } -}
\ No newline at end of file diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index 902253e80..790f8a8f6 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -322,6 +322,9 @@ namespace MediaBrowser.Model.Net throw new ArgumentNullException("mimeType"); } + // handle text/html; charset=UTF-8 + mimeType = mimeType.Split(';')[0]; + string result; if (ExtensionLookup.TryGetValue(mimeType, out result)) { diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index 5e1c17d1b..82e4acaec 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -21,11 +21,6 @@ AwardSummary, /// <summary> - /// The budget - /// </summary> - Budget, - - /// <summary> /// The can delete /// </summary> CanDelete, @@ -156,6 +151,8 @@ /// </summary> People, + PlayAccess, + /// <summary> /// The production locations /// </summary> @@ -174,11 +171,6 @@ RecursiveItemCount, /// <summary> - /// The revenue - /// </summary> - Revenue, - - /// <summary> /// The season name /// </summary> SeasonName, diff --git a/MediaBrowser.Model/Querying/ItemSortBy.cs b/MediaBrowser.Model/Querying/ItemSortBy.cs index 6f4ebd0c5..b379298a5 100644 --- a/MediaBrowser.Model/Querying/ItemSortBy.cs +++ b/MediaBrowser.Model/Querying/ItemSortBy.cs @@ -20,14 +20,6 @@ namespace MediaBrowser.Model.Querying /// </summary> public const string Artist = "Artist"; /// <summary> - /// The budget - /// </summary> - public const string Budget = "Budget"; - /// <summary> - /// The revenue - /// </summary> - public const string Revenue = "Revenue"; - /// <summary> /// The date created /// </summary> public const string DateCreated = "DateCreated"; diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs index 345931a62..fff4ee8e0 100644 --- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs @@ -73,6 +73,10 @@ namespace MediaBrowser.Model.Session /// <value>The volume level.</value> public int? VolumeLevel { get; set; } + public int? Brightness { get; set; } + + public string AspectRatio { get; set; } + /// <summary> /// Gets or sets the play method. /// </summary> |
