瀏覽代碼

added more card layouts

Luke Pulverenti 10 年之前
父節點
當前提交
4f5c768704

+ 15 - 0
MediaBrowser.Api/Playback/BaseStreamingService.cs

@@ -1402,6 +1402,13 @@ namespace MediaBrowser.Api.Playback
                         videoRequest.Profile = val;
                     }
                 }
+                else if (i == 20)
+                {
+                    if (videoRequest != null)
+                    {
+                        videoRequest.Cabac = string.Equals("true", val, StringComparison.OrdinalIgnoreCase);
+                    }
+                }
             }
         }
 
@@ -1867,6 +1874,14 @@ namespace MediaBrowser.Api.Playback
                 }
             }
 
+            if (request.Cabac.HasValue && request.Cabac.Value)
+            {
+                if (videoStream.IsCabac.HasValue && !videoStream.IsCabac.Value)
+                {
+                    return false;
+                }
+            }
+
             return request.EnableAutoStreamCopy;
         }
 

+ 3 - 0
MediaBrowser.Api/Playback/StreamRequest.cs

@@ -189,6 +189,9 @@ namespace MediaBrowser.Api.Playback
         [ApiMember(Name = "EnableAutoStreamCopy", Description = "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
         public bool EnableAutoStreamCopy { get; set; }
 
+        [ApiMember(Name = "Cabac", Description = "Enable if cabac encoding is required", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
+        public bool? Cabac { get; set; }
+        
         public VideoStreamRequest()
         {
             EnableAutoStreamCopy = true;

+ 2 - 2
MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs

@@ -139,14 +139,14 @@ namespace MediaBrowser.Controller.Entities.Audio
         {
             var id = this.GetProviderId(MetadataProviders.MusicBrainzReleaseGroup);
 
-            if (!string.IsNullOrEmpty(id))
+            if (!string.IsNullOrWhiteSpace(id))
             {
                 return "MusicAlbum-MusicBrainzReleaseGroup-" + id;
             }
 
             id = this.GetProviderId(MetadataProviders.MusicBrainzAlbum);
 
-            if (!string.IsNullOrEmpty(id))
+            if (!string.IsNullOrWhiteSpace(id))
             {
                 return "MusicAlbum-Musicbrainz-" + id;
             }

+ 9 - 3
MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs

@@ -157,18 +157,24 @@ namespace MediaBrowser.Controller.Resolvers
 
             // Normalize
             // Remove whitespace
-            filename = filename.Replace("-", string.Empty);
-            filename = filename.Replace(".", string.Empty);
-            filename = Regex.Replace(filename, @"\s+", "");
+            filename = filename.Replace("-", " ");
+            filename = filename.Replace(".", " ");
+            filename = filename.Replace("(", " ");
+            filename = filename.Replace(")", " ");
+            filename = Regex.Replace(filename, @"\s+", " ");
 
             var prefixes = new[] { "disc", "cd", "disk", "vol", "volume" };
 
+            filename = filename.TrimStart();
+
             foreach (var prefix in prefixes)
             {
                 if (filename.IndexOf(prefix, StringComparison.OrdinalIgnoreCase) == 0)
                 {
                     var tmp = filename.Substring(prefix.Length);
 
+                    tmp = tmp.Trim().Split(' ').FirstOrDefault() ?? string.Empty;
+
                     int val;
                     if (int.TryParse(tmp, NumberStyles.Any, CultureInfo.InvariantCulture, out val))
                     {

+ 9 - 1
MediaBrowser.Model/Dlna/StreamBuilder.cs

@@ -646,9 +646,17 @@ namespace MediaBrowser.Model.Dlna
                             }
                             break;
                         }
+                    case ProfileConditionValue.IsCabac:
+                        {
+                            bool val;
+                            if (BoolHelper.TryParseCultureInvariant(value, out val))
+                            {
+                                item.Cabac = val;
+                            }
+                            break;
+                        }
                     case ProfileConditionValue.AudioProfile:
                     case ProfileConditionValue.IsAnamorphic:
-                    case ProfileConditionValue.IsCabac:
                     case ProfileConditionValue.Has64BitOffsets:
                     case ProfileConditionValue.PacketLength:
                     case ProfileConditionValue.VideoTimestamp:

+ 2 - 0
MediaBrowser.Model/Dlna/StreamInfo.cs

@@ -30,6 +30,7 @@ namespace MediaBrowser.Model.Dlna
         public string VideoCodec { get; set; }
         public string VideoProfile { get; set; }
 
+        public bool? Cabac { get; set; }
         public string AudioCodec { get; set; }
 
         public int? AudioStreamIndex { get; set; }
@@ -144,6 +145,7 @@ namespace MediaBrowser.Model.Dlna
             list.Add(item.MaxRefFrames.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxRefFrames.Value) : string.Empty);
             list.Add(item.MaxVideoBitDepth.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxVideoBitDepth.Value) : string.Empty);
             list.Add(item.VideoProfile ?? string.Empty);
+            list.Add(item.Cabac.HasValue ? item.Cabac.Value.ToString() : string.Empty);
 
             return string.Format("Params={0}", string.Join(";", list.ToArray()));
         }

+ 1 - 2
MediaBrowser.Server.Implementations/Library/UserManager.cs

@@ -1,5 +1,4 @@
-using MediaBrowser.Common;
-using MediaBrowser.Common.Events;
+using MediaBrowser.Common.Events;
 using MediaBrowser.Common.Extensions;
 using MediaBrowser.Common.Net;
 using MediaBrowser.Controller;

+ 0 - 8
MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj

@@ -150,14 +150,6 @@
       <Link>MediaInfo\osx\libmediainfo.dylib</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="..\ThirdParty\SQLite3\linux\x86\3.8.2\libsqlite3.so.0.8.6">
-      <Link>sqlite3\linux\lib\libsqlite3.so.0.8.6</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="..\ThirdParty\SQLite3\linux\x86_64\3.8.2\libsqlite3.so.0.8.6">
-      <Link>sqlite3\linux\lib64\libsqlite3.so.0.8.6</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
     <None Include="..\ThirdParty\SQLite3\osx\libsqlite3.0.dylib">
       <Link>libsqlite3.0.dylib</Link>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+ 1 - 3
MediaBrowser.Server.Mono/System.Data.SQLite.dll.config

@@ -1,5 +1,3 @@
 <configuration>
-  <dllmap dll="sqlite3" target="./sqlite3/linux/lib/libsqlite3.so.0.8.6" os="linux" wordsize="32"/>
-  <dllmap dll="sqlite3" target="./sqlite3/linux/lib64/libsqlite3.so.0.8.6" os="linux" wordsize="64"/>
-  <dllmap dll="sqlite3" target="libsqlite3.so.0.8.6" os="linux" cpu="!x86,x86-64"/>
+  <dllmap dll="sqlite3" target="libsqlite3.so" os="linux"/>
 </configuration>

+ 5 - 5
MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloadInfo.cs

@@ -63,7 +63,7 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
 
                     info.FFMpegFilename = "ffmpeg.exe";
                     info.FFProbeFilename = "ffprobe.exe";
-                    info.Version = "20141005";
+                    info.Version = "20141111";
                     info.ArchiveType = "7z";
 
                     switch (environment.SystemArchitecture)
@@ -92,14 +92,14 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
                         case Architecture.X86_X64:
                             return new[]
                             {
-                                "http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20141005-git-e079d43-win64-static.7z",
-                                "https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/windows/ffmpeg-20141005-git-e079d43-win64-static.7z"
+                                "http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20141111-git-48efe9e-win64-static.7z",
+                                "https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/windows/ffmpeg-20141111-git-48efe9e-win64-static.7z"
                             };
                         case Architecture.X86:
                             return new[]
                             {
-                                "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20141005-git-e079d43-win32-static.7z",
-                                "https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/windows/ffmpeg-20141005-git-e079d43-win32-static.7z"
+                                "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20141111-git-48efe9e-win32-static.7z",
+                                "https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/windows/ffmpeg-20141111-git-48efe9e-win32-static.7z"
                             };
                     }
                     break;

+ 6 - 0
MediaBrowser.Tests/Resolvers/MusicResolverTests.cs

@@ -25,6 +25,12 @@ namespace MediaBrowser.Tests.Resolvers
             Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"cd  - 1"));
             Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"disc- 1"));
             Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"disk - 1"));
+
+            Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"Disc 01 (Hugo Wolf · 24 Lieder)"));
+            Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"Disc 04 (Encores and Folk Songs)"));
+            Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"Disc04 (Encores and Folk Songs)"));
+            Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"Disc 04(Encores and Folk Songs)"));
+            Assert.IsTrue(EntityResolutionHelper.IsMultiDiscAlbumFolder(@"Disc04(Encores and Folk Songs)"));
         }
     }
 }