update library menu

pull/702/head
Luke Pulverenti 10 years ago
parent 6562824a84
commit d274d1d807

@ -53,7 +53,11 @@ namespace Emby.Drawing
private readonly IImageEncoder _imageEncoder; private readonly IImageEncoder _imageEncoder;
private readonly SemaphoreSlim _imageProcessingSemaphore; private readonly SemaphoreSlim _imageProcessingSemaphore;
public ImageProcessor(ILogger logger, IServerApplicationPaths appPaths, IFileSystem fileSystem, IJsonSerializer jsonSerializer, IImageEncoder imageEncoder) public ImageProcessor(ILogger logger,
IServerApplicationPaths appPaths,
IFileSystem fileSystem,
IJsonSerializer jsonSerializer,
IImageEncoder imageEncoder)
{ {
_logger = logger; _logger = logger;
_fileSystem = fileSystem; _fileSystem = fileSystem;

@ -159,10 +159,12 @@ namespace MediaBrowser.Api.Playback.Hls
{ {
var text = reader.ReadToEnd(); var text = reader.ReadToEnd();
var newDuration = "#EXT-X-TARGETDURATION:" + segmentLength.ToString(UsCulture) + Environment.NewLine + "#EXT-X-ALLOW-CACHE:NO"; var newDuration = "#EXT-X-TARGETDURATION:" + segmentLength.ToString(UsCulture);
// ffmpeg pads the reported length by a full second // ffmpeg pads the reported length by a full second
return text.Replace("#EXT-X-TARGETDURATION:" + (segmentLength + 1).ToString(UsCulture), newDuration, StringComparison.OrdinalIgnoreCase); text = text.Replace("#EXT-X-TARGETDURATION:" + (segmentLength + 1).ToString(UsCulture), newDuration, StringComparison.OrdinalIgnoreCase);
return text;
} }
} }
} }

@ -608,7 +608,6 @@ namespace MediaBrowser.Api.Playback.Hls
builder.AppendLine("#EXT-X-VERSION:3"); builder.AppendLine("#EXT-X-VERSION:3");
builder.AppendLine("#EXT-X-TARGETDURATION:" + state.SegmentLength.ToString(UsCulture)); builder.AppendLine("#EXT-X-TARGETDURATION:" + state.SegmentLength.ToString(UsCulture));
builder.AppendLine("#EXT-X-MEDIA-SEQUENCE:0"); builder.AppendLine("#EXT-X-MEDIA-SEQUENCE:0");
builder.AppendLine("#EXT-X-ALLOW-CACHE:NO");
var queryStringIndex = Request.RawUrl.IndexOf('?'); var queryStringIndex = Request.RawUrl.IndexOf('?');
var queryString = queryStringIndex == -1 ? string.Empty : Request.RawUrl.Substring(queryStringIndex); var queryString = queryStringIndex == -1 ? string.Empty : Request.RawUrl.Substring(queryStringIndex);

@ -8,7 +8,6 @@ using MediaBrowser.Controller.Plugins;
using MediaBrowser.Dlna.Profiles; using MediaBrowser.Dlna.Profiles;
using MediaBrowser.Dlna.Server; using MediaBrowser.Dlna.Server;
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna.Profiles;
using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Serialization;

@ -77,6 +77,7 @@
<Compile Include="Common\DeviceService.cs" /> <Compile Include="Common\DeviceService.cs" />
<Compile Include="Didl\DidlBuilder.cs" /> <Compile Include="Didl\DidlBuilder.cs" />
<Compile Include="PlayTo\PlayToController.cs" /> <Compile Include="PlayTo\PlayToController.cs" />
<Compile Include="Profiles\DefaultProfile.cs" />
<Compile Include="Profiles\DirectTvProfile.cs" /> <Compile Include="Profiles\DirectTvProfile.cs" />
<Compile Include="Profiles\DishHopperJoeyProfile.cs" /> <Compile Include="Profiles\DishHopperJoeyProfile.cs" />
<Compile Include="Profiles\PopcornHourProfile.cs" /> <Compile Include="Profiles\PopcornHourProfile.cs" />

@ -1,6 +1,7 @@
using System.Xml.Serialization; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization;
namespace MediaBrowser.Model.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {
[XmlRoot("Profile")] [XmlRoot("Profile")]
public class DefaultProfile : DeviceProfile public class DefaultProfile : DeviceProfile

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,7 +1,6 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Dlna;
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,5 +1,4 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna.Profiles;
using System.Xml.Serialization; using System.Xml.Serialization;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles

@ -1,5 +1,4 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna.Profiles;
using System.Xml.Serialization; using System.Xml.Serialization;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles

@ -1,5 +1,4 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna.Profiles;
using System.Xml.Serialization; using System.Xml.Serialization;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,5 +1,4 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna.Profiles;
using System.Xml.Serialization; using System.Xml.Serialization;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles

@ -1,6 +1,5 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Dlna.Profiles;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles
{ {

@ -1,5 +1,4 @@
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna.Profiles;
using System.Xml.Serialization; using System.Xml.Serialization;
namespace MediaBrowser.Dlna.Profiles namespace MediaBrowser.Dlna.Profiles

@ -377,11 +377,11 @@ namespace MediaBrowser.Dlna.Ssdp
} }
foreach (var d in RegisteredDevices) foreach (var d in RegisteredDevices)
{ {
NotifyDevice(d, "alive"); NotifyDevice(d, "alive", 1);
} }
} }
private void NotifyDevice(UpnpDevice dev, string type, int sendCount = 1) private void NotifyDevice(UpnpDevice dev, string type, int sendCount)
{ {
const string header = "NOTIFY * HTTP/1.1"; const string header = "NOTIFY * HTTP/1.1";

@ -146,7 +146,44 @@ namespace MediaBrowser.MediaEncoding.Probing
// string.Equals(stream.AspectRatio, "2.35:1", StringComparison.OrdinalIgnoreCase) || // string.Equals(stream.AspectRatio, "2.35:1", StringComparison.OrdinalIgnoreCase) ||
// string.Equals(stream.AspectRatio, "2.40:1", StringComparison.OrdinalIgnoreCase); // string.Equals(stream.AspectRatio, "2.40:1", StringComparison.OrdinalIgnoreCase);
stream.IsAnamorphic = string.Equals(streamInfo.sample_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase); if (string.Equals(streamInfo.sample_aspect_ratio, "1:1", StringComparison.OrdinalIgnoreCase))
{
stream.IsAnamorphic = false;
}
else if (!((string.IsNullOrWhiteSpace(streamInfo.sample_aspect_ratio) || string.Equals(streamInfo.sample_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase))))
{
stream.IsAnamorphic = true;
}
else if (string.IsNullOrWhiteSpace(streamInfo.display_aspect_ratio) || string.Equals(streamInfo.display_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase))
{
stream.IsAnamorphic = false;
}
else
{
var ratioParts = streamInfo.display_aspect_ratio.Split(':');
if (ratioParts.Length != 2)
{
stream.IsAnamorphic = false;
}
else
{
int ratio0;
int ratio1;
if (!Int32.TryParse(ratioParts[0], NumberStyles.Any, CultureInfo.InvariantCulture, out ratio0))
{
stream.IsAnamorphic = false;
}
else if (!Int32.TryParse(ratioParts[1], NumberStyles.Any, CultureInfo.InvariantCulture, out ratio1))
{
stream.IsAnamorphic = false;
}
else
{
stream.IsAnamorphic = ((streamInfo.width * ratio1) != (stream.Height * ratio0));
}
}
}
} }
else else
{ {

@ -383,9 +383,6 @@
<Compile Include="..\MediaBrowser.Model\Dlna\ProfileConditionValue.cs"> <Compile Include="..\MediaBrowser.Model\Dlna\ProfileConditionValue.cs">
<Link>Dlna\ProfileConditionValue.cs</Link> <Link>Dlna\ProfileConditionValue.cs</Link>
</Compile> </Compile>
<Compile Include="..\MediaBrowser.Model\Dlna\Profiles\DefaultProfile.cs">
<Link>Dlna\Profiles\DefaultProfile.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\Dlna\ResolutionConfiguration.cs"> <Compile Include="..\MediaBrowser.Model\Dlna\ResolutionConfiguration.cs">
<Link>Dlna\ResolutionConfiguration.cs</Link> <Link>Dlna\ResolutionConfiguration.cs</Link>
</Compile> </Compile>

@ -348,9 +348,6 @@
<Compile Include="..\MediaBrowser.Model\Dlna\ProfileConditionValue.cs"> <Compile Include="..\MediaBrowser.Model\Dlna\ProfileConditionValue.cs">
<Link>Dlna\ProfileConditionValue.cs</Link> <Link>Dlna\ProfileConditionValue.cs</Link>
</Compile> </Compile>
<Compile Include="..\MediaBrowser.Model\Dlna\Profiles\DefaultProfile.cs">
<Link>Dlna\Profiles\DefaultProfile.cs</Link>
</Compile>
<Compile Include="..\MediaBrowser.Model\Dlna\ResolutionConfiguration.cs"> <Compile Include="..\MediaBrowser.Model\Dlna\ResolutionConfiguration.cs">
<Link>Dlna\ResolutionConfiguration.cs</Link> <Link>Dlna\ResolutionConfiguration.cs</Link>
</Compile> </Compile>

@ -111,6 +111,10 @@ namespace MediaBrowser.Model.Dlna
XmlRootAttributes = new XmlAttribute[] { }; XmlRootAttributes = new XmlAttribute[] { };
SupportedMediaTypes = "Audio,Photo,Video"; SupportedMediaTypes = "Audio,Photo,Video";
MaxStreamingBitrate = 8000000;
MaxStaticBitrate = 8000000;
MusicStreamingTranscodingBitrate = 128000;
MusicSyncBitrate = 128000;
} }
public List<string> GetSupportedMediaTypes() public List<string> GetSupportedMediaTypes()

@ -130,7 +130,6 @@
<Compile Include="Dlna\NullLocalPlayer.cs" /> <Compile Include="Dlna\NullLocalPlayer.cs" />
<Compile Include="Dlna\PlaybackErrorCode.cs" /> <Compile Include="Dlna\PlaybackErrorCode.cs" />
<Compile Include="Dlna\PlaybackException.cs" /> <Compile Include="Dlna\PlaybackException.cs" />
<Compile Include="Dlna\Profiles\DefaultProfile.cs" />
<Compile Include="Dlna\ResolutionConfiguration.cs" /> <Compile Include="Dlna\ResolutionConfiguration.cs" />
<Compile Include="Dlna\ResolutionNormalizer.cs" /> <Compile Include="Dlna\ResolutionNormalizer.cs" />
<Compile Include="Dlna\ResolutionOptions.cs" /> <Compile Include="Dlna\ResolutionOptions.cs" />

@ -75,7 +75,10 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
private void Start() private void Start()
{ {
_logger.Debug("Starting NAT discovery"); _logger.Debug("Starting NAT discovery");
//NatUtility.EnabledProtocols = new List<NatProtocol>
//{
// NatProtocol.Pmp
//};
NatUtility.DeviceFound += NatUtility_DeviceFound; NatUtility.DeviceFound += NatUtility_DeviceFound;
// Mono.Nat does never rise this event. The event is there however it is useless. // Mono.Nat does never rise this event. The event is there however it is useless.

@ -436,6 +436,8 @@ namespace MediaBrowser.Server.Implementations.Persistence
_shrinkMemoryTimer = null; _shrinkMemoryTimer = null;
} }
//_writeLock.Wait();
if (_connection != null) if (_connection != null)
{ {
if (_connection.IsOpen()) if (_connection.IsOpen())

@ -27,7 +27,7 @@ namespace MediaBrowser.Server.Implementations.Sync
} }
var videoProfile = "high|main|baseline|constrained baseline"; var videoProfile = "high|main|baseline|constrained baseline";
var videoLevel = "41"; var videoLevel = "40";
DirectPlayProfiles = new[] DirectPlayProfiles = new[]
{ {

Loading…
Cancel
Save