update translations

This commit is contained in:
Luke Pulverenti
2014-08-26 23:25:39 -04:00
parent 6780e146a0
commit 809e4629c0
54 changed files with 3034 additions and 2668 deletions

View File

@@ -1,4 +1,5 @@
using MediaBrowser.Common.IO;
using System.Globalization;
using MediaBrowser.Common.IO;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using System;
@@ -188,6 +189,44 @@ namespace MediaBrowser.Controller.Resolvers
return string.Equals(extension, ".disc", StringComparison.OrdinalIgnoreCase);
}
/// <summary>
/// Determines whether [is multi disc album folder] [the specified path].
/// </summary>
/// <param name="path">The path.</param>
/// <returns><c>true</c> if [is multi disc album folder] [the specified path]; otherwise, <c>false</c>.</returns>
public static bool IsMultiDiscAlbumFolder(string path)
{
var filename = Path.GetFileName(path);
if (string.IsNullOrWhiteSpace(filename))
{
return false;
}
// Normalize
// Remove whitespace
filename = filename.Replace("-", string.Empty);
filename = Regex.Replace(filename, @"\s+", "");
var prefixes = new[] { "disc", "cd", "disk" };
foreach (var prefix in prefixes)
{
if (filename.IndexOf(prefix, StringComparison.OrdinalIgnoreCase) == 0)
{
var tmp = filename.Substring(prefix.Length);
int val;
if (int.TryParse(tmp, NumberStyles.Any, CultureInfo.InvariantCulture, out val))
{
return true;
}
}
}
return false;
}
/// <summary>
/// Ensures DateCreated and DateModified have values
/// </summary>