fix local trailers being resolved as movies

This commit is contained in:
Luke Pulverenti 2013-12-08 13:07:58 -05:00
parent fd0a7cb140
commit fe42a6d1d9

View File

@ -116,6 +116,13 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
return null; return null;
} }
var filename = Path.GetFileName(args.Path);
// Don't misidentify xbmc trailers as a movie
if (filename.IndexOf(BaseItem.XbmcTrailerFileSuffix, StringComparison.OrdinalIgnoreCase) != -1)
{
return null;
}
// Find movies that are mixed in the same folder // Find movies that are mixed in the same folder
if (args.Path.IndexOf("[trailers]", StringComparison.OrdinalIgnoreCase) != -1 || if (args.Path.IndexOf("[trailers]", StringComparison.OrdinalIgnoreCase) != -1 ||
string.Equals(collectionType, CollectionType.Trailers, StringComparison.OrdinalIgnoreCase)) string.Equals(collectionType, CollectionType.Trailers, StringComparison.OrdinalIgnoreCase))