mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-30 04:18:27 +01:00
Hopefully the last of dealing with the metadata folder
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user