added more card layouts

This commit is contained in:
Luke Pulverenti 2014-11-11 23:51:40 -05:00
parent 0dfac392e7
commit 4f5c768704
11 changed files with 53 additions and 24 deletions

View file

@ -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;
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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))
{

View file

@ -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:

View file

@ -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()));
}

View file

@ -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;

View file

@ -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>

View file

@ -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>

View file

@ -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;

View file

@ -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)"));
}
}
}