From 5fdd7ec6725a3acb3365e92c090f2e90bbbf122f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 16 Nov 2014 15:44:08 -0500 Subject: add new naming project --- .../Library/ResolverHelper.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/ResolverHelper.cs') diff --git a/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs b/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs index 10c9cf733..b9fbd6f8c 100644 --- a/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs +++ b/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs @@ -2,7 +2,6 @@ using MediaBrowser.Common.IO; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Resolvers; using System; using System.IO; using System.Linq; @@ -63,14 +62,14 @@ namespace MediaBrowser.Server.Implementations.Library if (string.IsNullOrEmpty(item.Name) && !string.IsNullOrEmpty(item.Path)) { //we use our resolve args name here to get the name of the containg folder, not actual video file - item.Name = GetMBName(args.FileInfo.Name, (args.FileInfo.Attributes & FileAttributes.Directory) == FileAttributes.Directory); + item.Name = GetMbName(args.FileInfo.Name, (args.FileInfo.Attributes & FileAttributes.Directory) == FileAttributes.Directory); } } /// /// The MB name regex /// - private static readonly Regex MBNameRegex = new Regex(@"(\[.*?\])", RegexOptions.Compiled); + private static readonly Regex MbNameRegex = new Regex(@"(\[.*?\])", RegexOptions.Compiled); /// /// Strip out attribute items and return just the name we will use for items @@ -78,7 +77,7 @@ namespace MediaBrowser.Server.Implementations.Library /// Assumed to be a file or directory path /// if set to true [is directory]. /// The cleaned name - private static string GetMBName(string path, bool isDirectory) + private static string GetMbName(string path, bool isDirectory) { //first just get the file or directory name var fn = isDirectory ? Path.GetFileName(path) : Path.GetFileNameWithoutExtension(path); @@ -89,8 +88,9 @@ namespace MediaBrowser.Server.Implementations.Library return fn; } - public static string StripBrackets(string inputString) { - var output = MBNameRegex.Replace(inputString, string.Empty).Trim(); + private static string StripBrackets(string inputString) + { + var output = MbNameRegex.Replace(inputString, string.Empty).Trim(); return Regex.Replace(output, @"\s+", " "); } -- cgit v1.2.3