aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs9
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs29
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs3
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj1
-rw-r--r--MediaBrowser.Model/Social/SocialShareInfo.cs16
5 files changed, 42 insertions, 16 deletions
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index e7490b3fa..19403a55e 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -25,7 +25,7 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
/// <value>The public HTTPS port.</value>
public int PublicHttpsPort { get; set; }
-
+
/// <summary>
/// Gets or sets the HTTP server port number.
/// </summary>
@@ -49,7 +49,7 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
/// <value><c>true</c> if [enable user specific user views]; otherwise, <c>false</c>.</value>
public bool EnableUserSpecificUserViews { get; set; }
-
+
/// <summary>
/// Gets or sets the value pointing to the file system where the ssl certiifcate is located..
/// </summary>
@@ -103,7 +103,7 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
/// <value><c>true</c> if [enable library metadata sub folder]; otherwise, <c>false</c>.</value>
public bool EnableLibraryMetadataSubFolder { get; set; }
-
+
/// <summary>
/// Gets or sets the preferred metadata language.
/// </summary>
@@ -211,6 +211,8 @@ namespace MediaBrowser.Model.Configuration
public AutoOnOff EnableLibraryMonitor { get; set; }
+ public int SharingExpirationDays { get; set; }
+
/// <summary>
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
/// </summary>
@@ -231,6 +233,7 @@ namespace MediaBrowser.Model.Configuration
EnableUPnP = true;
+ SharingExpirationDays = 30;
MinResumePct = 5;
MaxResumePct = 90;
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 3c1c7ea6d..340af3ac1 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -148,6 +148,7 @@ namespace MediaBrowser.Model.Dlna
{
if (!conditionProcessor.IsAudioConditionSatisfied(c, audioChannels, audioBitrate))
{
+ LogConditionFailure(options.Profile, "AudioCodecProfile", c, item);
all = false;
break;
}
@@ -274,14 +275,21 @@ namespace MediaBrowser.Model.Dlna
{
playMethods.Add(PlayMethod.DirectStream);
}
-
+
// The profile describes what the device supports
// If device requirements are satisfied then allow both direct stream and direct play
- if (item.SupportsDirectPlay && IsAudioEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options)))
+ if (item.SupportsDirectPlay &&
+ IsAudioEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options)))
{
playMethods.Add(PlayMethod.DirectPlay);
}
}
+ else
+ {
+ _logger.Debug("Profile: {0}, No direct play profiles found for Path: {1}",
+ options.Profile.Name ?? "Unknown Profile",
+ item.Path ?? "Unknown path");
+ }
return playMethods;
}
@@ -745,10 +753,9 @@ namespace MediaBrowser.Model.Dlna
}
}
+ // Look for supported embedded subs that we can just mux into the output
foreach (SubtitleProfile profile in subtitleProfiles)
{
- bool requiresConversion = !StringHelper.EqualsIgnoreCase(subtitleStream.Codec, profile.Format);
-
if (!profile.SupportsLanguage(subtitleStream.Language))
{
continue;
@@ -756,11 +763,6 @@ namespace MediaBrowser.Model.Dlna
if (profile.Method == SubtitleDeliveryMethod.Embed && subtitleStream.IsTextSubtitleStream == MediaStream.IsTextFormat(profile.Format))
{
- if (!requiresConversion)
- {
- return profile;
- }
-
return profile;
}
}
@@ -774,8 +776,13 @@ namespace MediaBrowser.Model.Dlna
private bool IsAudioEligibleForDirectPlay(MediaSourceInfo item, int? maxBitrate)
{
- // Honor the max bitrate setting
- return !maxBitrate.HasValue || (item.Bitrate.HasValue && item.Bitrate.Value <= maxBitrate.Value);
+ if (!maxBitrate.HasValue || (item.Bitrate.HasValue && item.Bitrate.Value <= maxBitrate.Value))
+ {
+ return true;
+ }
+
+ _logger.Debug("Audio Bitrate exceeds DirectPlay limit");
+ return false;
}
private void ValidateInput(VideoOptions options)
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index f842a9e3a..0aaa8035c 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -1,5 +1,4 @@
-using System.Collections.Generic;
-using MediaBrowser.Model.Dlna;
+using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Extensions;
using System.Diagnostics;
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 3daacdd73..b36fa2362 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -379,6 +379,7 @@
<Compile Include="Session\TranscodingInfo.cs" />
<Compile Include="Session\UserDataChangeInfo.cs" />
<Compile Include="Devices\ContentUploadHistory.cs" />
+ <Compile Include="Social\SocialShareInfo.cs" />
<Compile Include="Sync\CompleteSyncJobInfo.cs" />
<Compile Include="Sync\DeviceFileInfo.cs" />
<Compile Include="Sync\ItemFIleInfo.cs" />
diff --git a/MediaBrowser.Model/Social/SocialShareInfo.cs b/MediaBrowser.Model/Social/SocialShareInfo.cs
new file mode 100644
index 000000000..1b1c225c4
--- /dev/null
+++ b/MediaBrowser.Model/Social/SocialShareInfo.cs
@@ -0,0 +1,16 @@
+using System;
+
+namespace MediaBrowser.Model.Social
+{
+ public class SocialShareInfo
+ {
+ public string Id { get; set; }
+ public string Url { get; set; }
+ public string ItemId { get; set; }
+ public string UserId { get; set; }
+ public DateTime ExpirationDate { get; set; }
+ public string Name { get; set; }
+ public string ImageUrl { get; set; }
+ public string Overview { get; set; }
+ }
+}