Hopefully the last of dealing with the metadata folder

This commit is contained in:
ebr11 Eric Reed spam
2012-09-18 17:07:01 -04:00
parent 68de4a6568
commit 2c563ac92f
8 changed files with 53 additions and 39 deletions

View File

@@ -1,6 +1,7 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Entities;
using MediaBrowser.Controller.IO;
using System.ComponentModel.Composition;
using System.IO;
@@ -29,7 +30,7 @@ namespace MediaBrowser.Controller.Resolvers
// If the path is a file check for a matching extensions
if (!args.IsDirectory)
{
if (IsVideoFile(args.Path))
if (FileSystemHelper.IsVideoFile(args.Path))
{
VideoType type = Path.GetExtension(args.Path).EndsWith("iso", System.StringComparison.OrdinalIgnoreCase) ? VideoType.Iso : VideoType.VideoFile;
@@ -95,38 +96,5 @@ namespace MediaBrowser.Controller.Resolvers
return null;
}
private static bool IsVideoFile(string path)
{
string extension = Path.GetExtension(path).ToLower();
switch (extension)
{
case ".mkv":
case ".m2ts":
case ".iso":
case ".ts":
case ".rmvb":
case ".mov":
case ".avi":
case ".mpg":
case ".mpeg":
case ".wmv":
case ".mp4":
case ".divx":
case ".dvr-ms":
case ".wtv":
case ".ogm":
case ".ogv":
case ".asf":
case ".m4v":
case ".flv":
case ".f4v":
case ".3gp":
return true;
default:
return false;
}
}
}
}