aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
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.cs15
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs2
5 files changed, 32 insertions, 24 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 64780a8e3..3c1e4af36 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();
}
}
@@ -263,18 +263,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
videoCodec = "h264";
videoBitrate = 15000000;
}
- else if (string.Equals(profile, "internet720", StringComparison.OrdinalIgnoreCase))
- {
- width = 1280;
- height = 720;
- isInterlaced = false;
- videoCodec = "h264";
- videoBitrate = 8000000;
- }
else if (string.Equals(profile, "internet540", StringComparison.OrdinalIgnoreCase))
{
- width = 1280;
- height = 720;
+ width = 960;
+ height = 546;
isInterlaced = false;
videoCodec = "h264";
videoBitrate = 2500000;
@@ -401,6 +393,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
{
list.Add(await GetMediaSource(info, hdhrId, "heavy").ConfigureAwait(false));
+ list.Add(await GetMediaSource(info, hdhrId, "internet540").ConfigureAwait(false));
list.Add(await GetMediaSource(info, hdhrId, "internet480").ConfigureAwait(false));
list.Add(await GetMediaSource(info, hdhrId, "internet360").ConfigureAwait(false));
list.Add(await GetMediaSource(info, hdhrId, "internet240").ConfigureAwait(false));
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)
{