Browse Source

update library menu

Luke Pulverenti 10 years ago
parent
commit
d274d1d807
35 changed files with 65 additions and 40 deletions
  1. 5 1
      Emby.Drawing/ImageProcessor.cs
  2. 4 2
      MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
  3. 0 1
      MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
  4. 0 1
      MediaBrowser.Dlna/DlnaManager.cs
  5. 1 0
      MediaBrowser.Dlna/MediaBrowser.Dlna.csproj
  6. 3 2
      MediaBrowser.Dlna/Profiles/DefaultProfile.cs
  7. 0 1
      MediaBrowser.Dlna/Profiles/DenonAvrProfile.cs
  8. 0 1
      MediaBrowser.Dlna/Profiles/DirectTvProfile.cs
  9. 0 1
      MediaBrowser.Dlna/Profiles/DishHopperJoeyProfile.cs
  10. 0 1
      MediaBrowser.Dlna/Profiles/Foobar2000Profile.cs
  11. 0 1
      MediaBrowser.Dlna/Profiles/LgTvProfile.cs
  12. 0 1
      MediaBrowser.Dlna/Profiles/LinksysDMA2100Profile.cs
  13. 0 1
      MediaBrowser.Dlna/Profiles/MediaMonkeyProfile.cs
  14. 0 1
      MediaBrowser.Dlna/Profiles/PanasonicVieraProfile.cs
  15. 0 1
      MediaBrowser.Dlna/Profiles/PopcornHourProfile.cs
  16. 0 1
      MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs
  17. 0 1
      MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013Profile.cs
  18. 0 1
      MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.cs
  19. 0 1
      MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs
  20. 0 1
      MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs
  21. 0 1
      MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.cs
  22. 0 1
      MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs
  23. 0 1
      MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs
  24. 0 1
      MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs
  25. 0 1
      MediaBrowser.Dlna/Profiles/Xbox360Profile.cs
  26. 0 1
      MediaBrowser.Dlna/Profiles/XboxOneProfile.cs
  27. 2 2
      MediaBrowser.Dlna/Ssdp/SsdpHandler.cs
  28. 38 1
      MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
  29. 0 3
      MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj
  30. 0 3
      MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj
  31. 4 0
      MediaBrowser.Model/Dlna/DeviceProfile.cs
  32. 0 1
      MediaBrowser.Model/MediaBrowser.Model.csproj
  33. 4 1
      MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
  34. 3 1
      MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
  35. 1 1
      MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs

+ 5 - 1
Emby.Drawing/ImageProcessor.cs

@@ -53,7 +53,11 @@ namespace Emby.Drawing
         private readonly IImageEncoder _imageEncoder;
         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;
             _fileSystem = fileSystem;

+ 4 - 2
MediaBrowser.Api/Playback/Hls/BaseHlsService.cs

@@ -159,10 +159,12 @@ namespace MediaBrowser.Api.Playback.Hls
                 {
                     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
-                    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;
                 }
             }
         }

+ 0 - 1
MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs

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

+ 0 - 1
MediaBrowser.Dlna/DlnaManager.cs

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

+ 1 - 0
MediaBrowser.Dlna/MediaBrowser.Dlna.csproj

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

+ 3 - 2
MediaBrowser.Model/Dlna/Profiles/DefaultProfile.cs → MediaBrowser.Dlna/Profiles/DefaultProfile.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")]
     public class DefaultProfile : DeviceProfile

+ 0 - 1
MediaBrowser.Dlna/Profiles/DenonAvrProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/DirectTvProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/DishHopperJoeyProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/Foobar2000Profile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/LgTvProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/LinksysDMA2100Profile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/MediaMonkeyProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/PanasonicVieraProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/PopcornHourProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013Profile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/Xbox360Profile.cs

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

+ 0 - 1
MediaBrowser.Dlna/Profiles/XboxOneProfile.cs

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

+ 2 - 2
MediaBrowser.Dlna/Ssdp/SsdpHandler.cs

@@ -377,11 +377,11 @@ namespace MediaBrowser.Dlna.Ssdp
             }
             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";
 

+ 38 - 1
MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs

@@ -146,7 +146,44 @@ namespace MediaBrowser.MediaEncoding.Probing
                 //    string.Equals(stream.AspectRatio, "2.35: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
             {

+ 0 - 3
MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj

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

+ 0 - 3
MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj

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

+ 4 - 0
MediaBrowser.Model/Dlna/DeviceProfile.cs

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

+ 0 - 1
MediaBrowser.Model/MediaBrowser.Model.csproj

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

+ 4 - 1
MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs

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

+ 3 - 1
MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs

@@ -435,7 +435,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
                             _shrinkMemoryTimer.Dispose();
                             _shrinkMemoryTimer = null;
                         }
-                        
+
+                        //_writeLock.Wait();
+
                         if (_connection != null)
                         {
                             if (_connection.IsOpen())

+ 1 - 1
MediaBrowser.Server.Implementations/Sync/CloudSyncProfile.cs

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