commit
15de5cbe1c
|
@ -29,13 +29,14 @@ 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)
|
||||
public UsageEntryPoint(ILogger logger, IApplicationHost applicationHost, INetworkManager networkManager, IHttpClient httpClient, ISessionManager sessionManager, IUserManager userManager)
|
||||
{
|
||||
_logger = logger;
|
||||
_applicationHost = applicationHost;
|
||||
_networkManager = networkManager;
|
||||
_httpClient = httpClient;
|
||||
_sessionManager = sessionManager;
|
||||
_userManager = userManager;
|
||||
|
||||
_sessionManager.SessionStarted += _sessionManager_SessionStarted;
|
||||
}
|
||||
|
|
|
@ -33,10 +33,9 @@ namespace MediaBrowser.Server.Implementations.Library
|
|||
return str.Substring(start, end - start);
|
||||
}
|
||||
// for imdbid we also accept pattern matching
|
||||
if (attrib == "imdbid")
|
||||
if (string.Equals(attrib, "imdbid", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Regex imdbPattern = new Regex("tt\\d{7}");
|
||||
var m = imdbPattern.Match(str);
|
||||
var m = Regex.Match(str, "tt\\d{7}", RegexOptions.IgnoreCase);
|
||||
return m.Success ? m.Value : null;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
|||
/// </summary>
|
||||
public class MovieResolver : BaseVideoResolver<Video>, IMultiItemResolver
|
||||
{
|
||||
public MovieResolver(ILibraryManager libraryManager) : base(libraryManager)
|
||||
public MovieResolver(ILibraryManager libraryManager)
|
||||
: base(libraryManager)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -236,6 +237,8 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
|||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
private void SetProviderIdsFromPath(Video item)
|
||||
{
|
||||
if (item is Movie || item is MusicVideo)
|
||||
{
|
||||
//we need to only look at the name of this actual item (not parents)
|
||||
var justName = item.IsInMixedFolder ? Path.GetFileName(item.Path) : Path.GetFileName(item.ContainingFolderPath);
|
||||
|
@ -255,7 +258,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
|||
{
|
||||
item.SetProviderId(MetadataProviders.Imdb, imdbid);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue
Block a user