aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-04-06 12:18:18 -0400
committerLuke <luke.pulverenti@gmail.com>2016-04-06 12:18:18 -0400
commit22e0df5349f4d7aec6a05c6726e9e893782e0770 (patch)
treea43a604a2e29a86c78c68e39072790613c7ea61b /MediaBrowser.Server.Implementations
parentab9b6ee7c3c947bab30a7e0a2c0eb22d3c5254a7 (diff)
parent0e0398026232dac5b7fe71f0dfac1df854c10282 (diff)
Merge pull request #1635 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Connect/ConnectManager.cs15
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs23
-rw-r--r--MediaBrowser.Server.Implementations/Library/UserManager.cs1
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs2
5 files changed, 29 insertions, 14 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
index 9ed67f77e..e308acef0 100644
--- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
+++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
@@ -62,6 +62,17 @@ namespace MediaBrowser.Server.Implementations.Connect
{
var address = _config.Configuration.WanDdns;
+ if (!string.IsNullOrWhiteSpace(address))
+ {
+ try
+ {
+ address = new Uri(address).Host;
+ }
+ catch
+ {
+ }
+ }
+
if (string.IsNullOrWhiteSpace(address) && DiscoveredWanIpAddress != null)
{
if (DiscoveredWanIpAddress.AddressFamily == AddressFamily.InterNetworkV6)
@@ -237,8 +248,8 @@ namespace MediaBrowser.Server.Implementations.Connect
var postData = new Dictionary<string, string>
{
- {"name", _appHost.FriendlyName},
- {"url", wanApiAddress},
+ {"name", _appHost.FriendlyName},
+ {"url", wanApiAddress},
{"systemId", _appHost.SystemId}
};
diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
index 3e4f4a70c..25463b660 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -344,6 +344,19 @@ namespace MediaBrowser.Server.Implementations.HttpServer
LoggerUtils.LogRequest(_logger, urlToLog, httpReq.HttpMethod, httpReq.UserAgent);
}
+ if (string.Equals(localPath, "/emby/", StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(localPath, "/mediabrowser/", StringComparison.OrdinalIgnoreCase))
+ {
+ httpRes.RedirectToUrl(DefaultRedirectPath);
+ return Task.FromResult(true);
+ }
+ if (string.Equals(localPath, "/emby", StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(localPath, "/mediabrowser", StringComparison.OrdinalIgnoreCase))
+ {
+ httpRes.RedirectToUrl("emby/" + DefaultRedirectPath);
+ return Task.FromResult(true);
+ }
+
if (string.Equals(localPath, "/mediabrowser/", StringComparison.OrdinalIgnoreCase) ||
string.Equals(localPath, "/mediabrowser", StringComparison.OrdinalIgnoreCase) ||
localPath.IndexOf("mediabrowser/web", StringComparison.OrdinalIgnoreCase) != -1 ||
@@ -363,16 +376,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
}
}
- if (string.Equals(localPath, "/emby/", StringComparison.OrdinalIgnoreCase))
- {
- httpRes.RedirectToUrl(DefaultRedirectPath);
- return Task.FromResult(true);
- }
- if (string.Equals(localPath, "/emby", StringComparison.OrdinalIgnoreCase))
- {
- httpRes.RedirectToUrl("emby/" + DefaultRedirectPath);
- return Task.FromResult(true);
- }
if (string.Equals(localPath, "/web", StringComparison.OrdinalIgnoreCase))
{
httpRes.RedirectToUrl(DefaultRedirectPath);
diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/MediaBrowser.Server.Implementations/Library/UserManager.cs
index c1807efe9..5ba83d6c7 100644
--- a/MediaBrowser.Server.Implementations/Library/UserManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/UserManager.cs
@@ -352,6 +352,7 @@ namespace MediaBrowser.Server.Implementations.Library
users.Add(user);
user.Policy.IsAdministrator = true;
+ user.Policy.EnableContentDeletion = true;
user.Policy.EnableRemoteControlOfOtherUsers = true;
await UpdateUserPolicy(user, user.Policy, false).ConfigureAwait(false);
}
diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
index ef8efbe98..7fc54819d 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs
@@ -75,7 +75,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
lineup = lineup.Where(i => i.Favorite).ToList();
}
- return lineup;
+ return lineup.Where(i => !i.DRM).ToList();
}
}
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
index 71c338fdb..b6699d164 100644
--- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
@@ -2283,7 +2283,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
private static Dictionary<string, string[]> GetTypeMapDictionary()
{
- var dict = new Dictionary<string, string[]>();
+ var dict = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase);
foreach (var t in KnownTypes)
{