add more reporting data

This commit is contained in:
Luke Pulverenti
2014-03-04 21:59:59 -05:00
parent 040c36dbf2
commit 9396f16aed
6 changed files with 101 additions and 45 deletions

View File

@@ -35,6 +35,7 @@ namespace MediaBrowser.Controller.Resolvers
// If the path is a file check for a matching extensions
if (!args.IsDirectory)
{
// http://wiki.xbmc.org/index.php?title=Media_stubs
var isPlaceHolder = EntityResolutionHelper.IsVideoPlaceHolder(args.Path);
if (EntityResolutionHelper.IsVideoFile(args.Path) || isPlaceHolder)
@@ -44,13 +45,34 @@ namespace MediaBrowser.Controller.Resolvers
var type = string.Equals(extension, ".iso", StringComparison.OrdinalIgnoreCase) || string.Equals(extension, ".img", StringComparison.OrdinalIgnoreCase) ?
VideoType.Iso : VideoType.VideoFile;
return new TVideoType
var video = new TVideoType
{
VideoType = type,
Path = args.Path,
IsInMixedFolder = true,
IsPlaceHolder = isPlaceHolder
};
if (isPlaceHolder)
{
if (args.Path.EndsWith("dvd.disc", StringComparison.OrdinalIgnoreCase))
{
video.VideoType = VideoType.Dvd;
}
else if (args.Path.EndsWith("hddvd.disc", StringComparison.OrdinalIgnoreCase))
{
video.VideoType = VideoType.HdDvd;
}
else if (args.Path.EndsWith("bluray.disc", StringComparison.OrdinalIgnoreCase) ||
args.Path.EndsWith("brrip.disc", StringComparison.OrdinalIgnoreCase) ||
args.Path.EndsWith("bd25.disc", StringComparison.OrdinalIgnoreCase) ||
args.Path.EndsWith("bd50.disc", StringComparison.OrdinalIgnoreCase))
{
video.VideoType = VideoType.BluRay;
}
}
return video;
}
}