aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-09 20:28:59 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-09-09 20:28:59 -0400
commitb314199319c599996090282d79baddcde413a187 (patch)
tree26760a6d449ecfc7b81e9b3ca4a5cb24a6f00223 /MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
parenta2dc5e090bac15ee2dd7c83281aa9fada1f74734 (diff)
resolve wtv transcoding
Diffstat (limited to 'MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs')
-rw-r--r--MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs56
1 files changed, 4 insertions, 52 deletions
diff --git a/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs b/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
index 7c68448e5..9f5eade8e 100644
--- a/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
+++ b/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
@@ -1,9 +1,10 @@
-using System.Globalization;
-using MediaBrowser.Common.IO;
+using MediaBrowser.Common.IO;
+using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
@@ -30,43 +31,6 @@ namespace MediaBrowser.Controller.Resolvers
};
- /// <summary>
- /// Any extension in this list is considered a video file - can be added to at runtime for extensibility
- /// </summary>
- public static List<string> VideoFileExtensions = new List<string>
- {
- ".mkv",
- ".m2t",
- ".m2ts",
- ".img",
- ".iso",
- ".mk3d",
- ".ts",
- ".rmvb",
- ".mov",
- ".avi",
- ".mpg",
- ".mpeg",
- ".wmv",
- ".mp4",
- ".divx",
- ".dvr-ms",
- ".wtv",
- ".ogm",
- ".ogv",
- ".asf",
- ".m4v",
- ".flv",
- ".f4v",
- ".3gp",
- ".webm",
- ".mts",
- ".m2v",
- ".rec"
- };
-
- private static readonly Dictionary<string, string> VideoFileExtensionsDictionary = VideoFileExtensions.ToDictionary(i => i, StringComparer.OrdinalIgnoreCase);
-
private static readonly Regex MultiFileRegex = new Regex(
@"(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[0-9]+)(.*?)(\.[^.]+)$",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
@@ -156,19 +120,7 @@ namespace MediaBrowser.Controller.Resolvers
/// <returns><c>true</c> if [is video file] [the specified path]; otherwise, <c>false</c>.</returns>
public static bool IsVideoFile(string path)
{
- if (string.IsNullOrEmpty(path))
- {
- throw new ArgumentNullException("path");
- }
-
- var extension = Path.GetExtension(path);
-
- if (string.IsNullOrEmpty(extension))
- {
- return false;
- }
-
- return VideoFileExtensionsDictionary.ContainsKey(extension);
+ return MimeTypes.IsVideoFile(path);
}
/// <summary>