diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-11-16 15:44:08 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-11-16 15:44:08 -0500 |
| commit | 5fdd7ec6725a3acb3365e92c090f2e90bbbf122f (patch) | |
| tree | e6032d9319cf2f459d2c5e718c36669c21d6dbfe /MediaBrowser.Server.Implementations/Library/ResolverHelper.cs | |
| parent | 4edcab9c11cf8e8cfbfc0bd9afe7b7ec067fd1e3 (diff) | |
add new naming project
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/ResolverHelper.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/ResolverHelper.cs | 12 |
1 files changed, 6 insertions, 6 deletions
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); } } /// <summary> /// The MB name regex /// </summary> - private static readonly Regex MBNameRegex = new Regex(@"(\[.*?\])", RegexOptions.Compiled); + private static readonly Regex MbNameRegex = new Regex(@"(\[.*?\])", RegexOptions.Compiled); /// <summary> /// Strip out attribute items and return just the name we will use for items @@ -78,7 +77,7 @@ namespace MediaBrowser.Server.Implementations.Library /// <param name="path">Assumed to be a file or directory path</param> /// <param name="isDirectory">if set to <c>true</c> [is directory].</param> /// <returns>The cleaned name</returns> - 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+", " "); } |
