diff options
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/Configuration/ManualLoginCategory.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Model/Configuration/ServerConfiguration.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/ConditionProcessor.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/DeviceProfile.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/MediaFormatProfile.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs | 18 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamBuilder.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamInfo.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/MediaVersionInfo.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Entities/MediaStream.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaBrowser.Model.csproj | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs | 7 |
13 files changed, 38 insertions, 40 deletions
diff --git a/MediaBrowser.Model/Configuration/ManualLoginCategory.cs b/MediaBrowser.Model/Configuration/ManualLoginCategory.cs deleted file mode 100644 index 37b6d6c82..000000000 --- a/MediaBrowser.Model/Configuration/ManualLoginCategory.cs +++ /dev/null @@ -1,9 +0,0 @@ - -namespace MediaBrowser.Model.Configuration -{ - public enum ManualLoginCategory - { - Mobile, - MediaBrowserTheater - } -} diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index ca5f569ed..325db34ed 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -168,8 +168,6 @@ namespace MediaBrowser.Model.Configuration /// <value>The dashboard source path.</value> public string DashboardSourcePath { get; set; } - public ManualLoginCategory[] ManualLoginClients { get; set; } - /// <summary> /// Gets or sets a value indicating whether [enable tv db updates]. /// </summary> @@ -178,6 +176,9 @@ namespace MediaBrowser.Model.Configuration public bool EnableTmdbUpdates { get; set; } public bool EnableFanArtUpdates { get; set; } + public bool RequireManualLoginForMobileApps { get; set; } + public bool RequireManualLoginForOtherApps { get; set; } + /// <summary> /// Gets or sets the image saving convention. /// </summary> @@ -256,7 +257,6 @@ namespace MediaBrowser.Model.Configuration EnableInternetProviders = true; //initial installs will need these - ManualLoginClients = new ManualLoginCategory[] { }; PathSubstitutions = new PathSubstitution[] { }; MetadataRefreshDays = 30; diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index 292ca2148..2e337982f 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -1,5 +1,7 @@ using System; using System.Globalization; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs index b2bbe3b14..f3357dc5b 100644 --- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs +++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs @@ -1,6 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index f6ca6b48f..70285078a 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfile.cs b/MediaBrowser.Model/Dlna/MediaFormatProfile.cs index 596985bdc..f3d04335f 100644 --- a/MediaBrowser.Model/Dlna/MediaFormatProfile.cs +++ b/MediaBrowser.Model/Dlna/MediaFormatProfile.cs @@ -110,11 +110,4 @@ namespace MediaBrowser.Model.Dlna MPEG4_H263_3GPP_P0_L10_AMR, MPEG4_H263_MP4_P0_L10_AAC } - - public enum TransportStreamTimestamp - { - NONE, - ZERO, - VALID - } } diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs index 9337a6c95..589dc3376 100644 --- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs +++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { @@ -147,14 +149,14 @@ namespace MediaBrowser.Model.Dlna } else if (string.Equals(videoCodec, "mpeg4", StringComparison.OrdinalIgnoreCase) || string.Equals(videoCodec, "msmpeg4", StringComparison.OrdinalIgnoreCase)) { - // if (audioCodec == AudioCodec.AAC) - // return Collections.singletonList(MediaFormatProfile.valueOf(String.format("MPEG4_P2_TS_ASP_AAC%s", cast(Object[])[ suffix ]))); - // if (audioCodec == AudioCodec.MP3) - // return Collections.singletonList(MediaFormatProfile.valueOf(String.format("MPEG4_P2_TS_ASP_MPEG1_L3%s", cast(Object[])[ suffix ]))); - // if (audioCodec == AudioCodec.MP2) - // return Collections.singletonList(MediaFormatProfile.valueOf(String.format("MPEG4_P2_TS_ASP_MPEG2_L2%s", cast(Object[])[ suffix ]))); - // if ((audioCodec is null) || (audioCodec == AudioCodec.AC3)) { - // return Collections.singletonList(MediaFormatProfile.valueOf(String.format("MPEG4_P2_TS_ASP_AC3%s", cast(Object[])[ suffix ]))); + if (string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase)) + return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AAC{0}", suffix)) }; + if (string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase)) + return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG1_L3{0}", suffix)) }; + if (string.Equals(audioCodec, "mp2", StringComparison.OrdinalIgnoreCase)) + return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG2_L2{0}", suffix)) }; + if (string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase)) + return new[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AC3{0}", suffix)) }; } return new List<MediaFormatProfile>(); diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index f3425d202..13c698ded 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { @@ -285,7 +286,7 @@ namespace MediaBrowser.Model.Dlna var audioBitrate = audioStream == null ? null : audioStream.BitRate; var audioChannels = audioStream == null ? null : audioStream.Channels; - var timestamp = videoStream == null ? TransportStreamTimestamp.NONE : videoStream.Timestamp; + var timestamp = videoStream == null ? TransportStreamTimestamp.NONE : mediaSource.Timestamp; var packetLength = videoStream == null ? null : videoStream.PacketLength; // Check container conditions diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index 0ab6805e3..e49c31947 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { @@ -339,11 +340,13 @@ namespace MediaBrowser.Model.Dlna { get { - var stream = TargetVideoStream; - - return !IsDirectStream + var defaultValue = string.Equals(Container, "m2ts", StringComparison.OrdinalIgnoreCase) ? TransportStreamTimestamp.VALID - : stream == null ? TransportStreamTimestamp.VALID : stream.Timestamp; + : TransportStreamTimestamp.NONE; + + return !IsDirectStream + ? defaultValue + : MediaSource == null ? defaultValue : MediaSource.Timestamp; } } diff --git a/MediaBrowser.Model/Dto/MediaVersionInfo.cs b/MediaBrowser.Model/Dto/MediaVersionInfo.cs index cfef83d2c..e2b197213 100644 --- a/MediaBrowser.Model/Dto/MediaVersionInfo.cs +++ b/MediaBrowser.Model/Dto/MediaVersionInfo.cs @@ -1,5 +1,6 @@ using MediaBrowser.Model.Entities; using System.Collections.Generic; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dto { @@ -30,6 +31,8 @@ namespace MediaBrowser.Model.Dto public int? Bitrate { get; set; } + public TransportStreamTimestamp Timestamp { get; set; } + public MediaSourceInfo() { Formats = new List<string>(); diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index 920112d02..d54e3c0ef 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Diagnostics; -using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Entities { @@ -53,12 +52,6 @@ namespace MediaBrowser.Model.Entities public int? PacketLength { get; set; } /// <summary> - /// Gets or sets the timestamp. - /// </summary> - /// <value>The timestamp.</value> - public TransportStreamTimestamp Timestamp { get; set; } - - /// <summary> /// Gets or sets the channels. /// </summary> /// <value>The channels.</value> diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index 1ae0833fb..c22688b33 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -62,7 +62,6 @@ <Compile Include="Configuration\AutoOrganize.cs" /> <Compile Include="Configuration\BaseApplicationConfiguration.cs" /> <Compile Include="Configuration\DlnaOptions.cs" /> - <Compile Include="Configuration\ManualLoginCategory.cs" /> <Compile Include="Configuration\MetadataPlugin.cs" /> <Compile Include="Configuration\MetadataOptions.cs" /> <Compile Include="Configuration\ServerConfiguration.cs" /> diff --git a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs index 963e8dd95..35000ca39 100644 --- a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs +++ b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs @@ -34,4 +34,11 @@ namespace MediaBrowser.Model.MediaInfo /// <value>The chapters.</value> public List<double> Chapters { get; set; } } + + public enum TransportStreamTimestamp + { + NONE, + ZERO, + VALID + } } |
