aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-10 14:42:14 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-10 14:42:14 -0500
commit5ff5df98678be11c11e93f80a44aeafe527999a1 (patch)
treedd3476802af6b62cea07a413eef3d61e21f2acba /MediaBrowser.Server.Implementations
parente97848289600570b489b6fdb608014b383772523 (diff)
added UniversalDetector.dll
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs8
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/UsageReporter.cs8
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs9
4 files changed, 15 insertions, 12 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs b/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs
index dac0b0d15..f9a141da3 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/UsageEntryPoint.cs
@@ -18,7 +18,6 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
public class UsageEntryPoint : IServerEntryPoint
{
private readonly IApplicationHost _applicationHost;
- private readonly INetworkManager _networkManager;
private readonly IHttpClient _httpClient;
private readonly ILogger _logger;
private readonly ISessionManager _sessionManager;
@@ -29,11 +28,10 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
private readonly ConcurrentDictionary<Guid, ClientInfo> _apps = new ConcurrentDictionary<Guid, ClientInfo>();
- public UsageEntryPoint(ILogger logger, IApplicationHost applicationHost, INetworkManager networkManager, IHttpClient httpClient, ISessionManager sessionManager, IUserManager userManager)
+ public UsageEntryPoint(ILogger logger, IApplicationHost applicationHost, IHttpClient httpClient, ISessionManager sessionManager, IUserManager userManager)
{
_logger = logger;
_applicationHost = applicationHost;
- _networkManager = networkManager;
_httpClient = httpClient;
_sessionManager = sessionManager;
_userManager = userManager;
@@ -68,7 +66,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
{
try
{
- await new UsageReporter(_applicationHost, _networkManager, _httpClient, _userManager)
+ await new UsageReporter(_applicationHost, _httpClient, _userManager)
.ReportAppUsage(client, CancellationToken.None)
.ConfigureAwait(false);
}
@@ -110,7 +108,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
{
try
{
- await new UsageReporter(_applicationHost, _networkManager, _httpClient, _userManager)
+ await new UsageReporter(_applicationHost, _httpClient, _userManager)
.ReportServerUsage(CancellationToken.None)
.ConfigureAwait(false);
}
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/UsageReporter.cs b/MediaBrowser.Server.Implementations/EntryPoints/UsageReporter.cs
index 5be267313..315493e0d 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/UsageReporter.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/UsageReporter.cs
@@ -14,15 +14,13 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
public class UsageReporter
{
private readonly IApplicationHost _applicationHost;
- private readonly INetworkManager _networkManager;
private readonly IHttpClient _httpClient;
private readonly IUserManager _userManager;
private const string MbAdminUrl = "http://www.mb3admin.com/admin/";
- public UsageReporter(IApplicationHost applicationHost, INetworkManager networkManager, IHttpClient httpClient, IUserManager userManager)
+ public UsageReporter(IApplicationHost applicationHost, IHttpClient httpClient, IUserManager userManager)
{
_applicationHost = applicationHost;
- _networkManager = networkManager;
_httpClient = httpClient;
_userManager = userManager;
}
@@ -31,12 +29,10 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
{
cancellationToken.ThrowIfCancellationRequested();
- var mac = _networkManager.GetMacAddress();
-
var data = new Dictionary<string, string>
{
{ "feature", _applicationHost.Name },
- { "mac", mac },
+ { "mac", _applicationHost.SystemId },
{ "serverid", _applicationHost.SystemId },
{ "deviceid", _applicationHost.SystemId },
{ "ver", _applicationHost.ApplicationVersion.ToString() },
diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
index 1d17c641d..c374a31b3 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs
@@ -138,7 +138,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
return true;
}
- return _config.Configuration.InsecureApps7.Contains(auth.Client ?? string.Empty,
+ return _config.Configuration.InsecureApps8.Contains(auth.Client ?? string.Empty,
StringComparer.OrdinalIgnoreCase);
}
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs
index e68f005be..d538c1dc0 100644
--- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs
+++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using System.Linq;
using MediaBrowser.Common.IO;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
@@ -143,6 +144,14 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
var namingOptions = ((LibraryManager)libraryManager).GetNamingOptions();
+ // In mixed folders we need to be conservative and avoid expressions that may result in false positives (e.g. movies with numbers in the title)
+ if (!isTvContentType)
+ {
+ namingOptions.EpisodeExpressions = namingOptions.EpisodeExpressions
+ .Where(i => i.IsNamed)
+ .ToList();
+ }
+
var episodeResolver = new Naming.TV.EpisodeResolver(namingOptions, new Naming.Logging.NullLogger());
var episodeInfo = episodeResolver.Resolve(fullName, FileInfoType.File, false);
if (episodeInfo != null && episodeInfo.EpisodeNumber.HasValue)