|
|
|
@ -85,6 +85,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
|
|
|
|
|
|
|
|
|
var collectionType = args.Parent == null ? null : _libraryManager.FindCollectionType(args.Parent);
|
|
|
|
|
|
|
|
|
|
// Find movies with their own folders
|
|
|
|
|
if (isDirectory)
|
|
|
|
|
{
|
|
|
|
|
if (args.Path.IndexOf("[trailers]", StringComparison.OrdinalIgnoreCase) != -1 ||
|
|
|
|
@ -115,7 +116,41 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
|
|
|
|
return FindMovie<Movie>(args.Path, args.FileSystemChildren);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
// Find movies that are mixed in the same folder
|
|
|
|
|
if (args.Path.IndexOf("[trailers]", StringComparison.OrdinalIgnoreCase) != -1 ||
|
|
|
|
|
string.Equals(collectionType, CollectionType.Trailers, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
return ResolveVideo<Trailer>(args);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Video item = null;
|
|
|
|
|
|
|
|
|
|
if (args.Path.IndexOf("[musicvideos]", StringComparison.OrdinalIgnoreCase) != -1 ||
|
|
|
|
|
string.Equals(collectionType, CollectionType.MusicVideos, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
item = ResolveVideo<MusicVideo>(args);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (args.Path.IndexOf("[adultvideos]", StringComparison.OrdinalIgnoreCase) != -1 ||
|
|
|
|
|
string.Equals(collectionType, CollectionType.AdultVideos, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
item = ResolveVideo<AdultVideo>(args);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// To find a movie file, the collection type must be movies or boxsets
|
|
|
|
|
// Otherwise we'll consider it a plain video and let the video resolver handle it
|
|
|
|
|
if (string.Equals(collectionType, CollectionType.Movies, StringComparison.OrdinalIgnoreCase) ||
|
|
|
|
|
string.Equals(collectionType, CollectionType.BoxSets, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
item = ResolveVideo<Movie>(args);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item != null)
|
|
|
|
|
{
|
|
|
|
|
item.IsInMixedFolder = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|