aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Core/ApplicationHost.cs2
-rw-r--r--Emby.Server.Implementations/Library/SearchEngine.cs5
-rw-r--r--MediaBrowser.Api/SearchService.cs5
-rw-r--r--MediaBrowser.Model/Search/SearchQuery.cs1
-rw-r--r--MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs3
5 files changed, 12 insertions, 4 deletions
diff --git a/Emby.Server.Core/ApplicationHost.cs b/Emby.Server.Core/ApplicationHost.cs
index 05f6c4309..994b942e9 100644
--- a/Emby.Server.Core/ApplicationHost.cs
+++ b/Emby.Server.Core/ApplicationHost.cs
@@ -1138,7 +1138,7 @@ namespace Emby.Server.Core
// Generate self-signed cert
var certHost = GetHostnameFromExternalDns(ServerConfigurationManager.Configuration.WanDdns);
- var certPath = Path.Combine(ServerConfigurationManager.ApplicationPaths.ProgramDataPath, "ssl", "cert_" + (certHost + "1").GetMD5().ToString("N") + ".pfx");
+ var certPath = Path.Combine(ServerConfigurationManager.ApplicationPaths.ProgramDataPath, "ssl", "cert_" + (certHost + "2").GetMD5().ToString("N") + ".pfx");
var password = "embycert";
if (generateCertificate)
diff --git a/Emby.Server.Implementations/Library/SearchEngine.cs b/Emby.Server.Implementations/Library/SearchEngine.cs
index a47a3322e..51c9504c2 100644
--- a/Emby.Server.Implementations/Library/SearchEngine.cs
+++ b/Emby.Server.Implementations/Library/SearchEngine.cs
@@ -165,7 +165,10 @@ namespace Emby.Server.Implementations.Library
ExcludeItemTypes = excludeItemTypes.ToArray(),
IncludeItemTypes = includeItemTypes.ToArray(),
Limit = query.Limit,
- IncludeItemsByName = true
+ IncludeItemsByName = string.IsNullOrWhiteSpace(query.ParentId),
+ ParentId = string.IsNullOrWhiteSpace(query.ParentId) ? (Guid?)null : new Guid(query.ParentId),
+ SortBy = new[] { ItemSortBy.SortName },
+ Recursive = true
});
// Add search hints based on item name
diff --git a/MediaBrowser.Api/SearchService.cs b/MediaBrowser.Api/SearchService.cs
index d6fa4030d..b4ee92365 100644
--- a/MediaBrowser.Api/SearchService.cs
+++ b/MediaBrowser.Api/SearchService.cs
@@ -66,6 +66,8 @@ namespace MediaBrowser.Api
[ApiMember(Name = "IncludeItemTypes", Description = "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
public string IncludeItemTypes { get; set; }
+ public string ParentId { get; set; }
+
public GetSearchHints()
{
IncludeArtists = true;
@@ -135,7 +137,8 @@ namespace MediaBrowser.Api
IncludeStudios = request.IncludeStudios,
StartIndex = request.StartIndex,
UserId = request.UserId,
- IncludeItemTypes = (request.IncludeItemTypes ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToArray()
+ IncludeItemTypes = (request.IncludeItemTypes ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToArray(),
+ ParentId = request.ParentId
}).ConfigureAwait(false);
diff --git a/MediaBrowser.Model/Search/SearchQuery.cs b/MediaBrowser.Model/Search/SearchQuery.cs
index 678dfd39d..11d2d97f7 100644
--- a/MediaBrowser.Model/Search/SearchQuery.cs
+++ b/MediaBrowser.Model/Search/SearchQuery.cs
@@ -34,6 +34,7 @@ namespace MediaBrowser.Model.Search
public bool IncludeArtists { get; set; }
public string[] IncludeItemTypes { get; set; }
+ public string ParentId { get; set; }
public SearchQuery()
{
diff --git a/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs b/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs
index a362045d0..4f5b3d004 100644
--- a/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs
+++ b/MediaBrowser.Server.Startup.Common/Cryptography/CertificateGenerator.cs
@@ -44,7 +44,7 @@ namespace Emby.Common.Implementations.Security
cb.NotAfter = notAfter;
cb.SubjectName = subject;
cb.SubjectPublicKey = subjectKey;
-
+
// signature
cb.Hash = "SHA256";
byte[] rawcert = cb.Sign(issuerKey);
@@ -60,6 +60,7 @@ namespace Emby.Common.Implementations.Security
attributes.Add(PKCS9.localKeyId, list);
p12.AddCertificate(new X509Certificate(rawcert), attributes);
+ p12.Password = password;
p12.AddPkcs8ShroudedKeyBag(subjectKey, attributes);
p12.SaveToFile(fileName);