mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-01 21:38:27 +01:00
make controller project portable
This commit is contained in:
@@ -10,7 +10,10 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using CommonIO;
|
||||
using System.Text;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller.IO;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Logging;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Localization
|
||||
@@ -80,7 +83,7 @@ namespace MediaBrowser.Server.Implementations.Localization
|
||||
var target = Path.Combine(localizationPath, filename);
|
||||
_logger.Info("Extracting ratings to {0}", target);
|
||||
|
||||
using (var fs = _fileSystem.GetFileStream(target, FileMode.Create, FileAccess.Write, FileShare.Read))
|
||||
using (var fs = _fileSystem.GetFileStream(target, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read))
|
||||
{
|
||||
stream.CopyTo(fs);
|
||||
}
|
||||
@@ -106,6 +109,15 @@ namespace MediaBrowser.Server.Implementations.Localization
|
||||
}
|
||||
}
|
||||
|
||||
public string RemoveDiacritics(string text)
|
||||
{
|
||||
return String.Concat(
|
||||
text.Normalize(NormalizationForm.FormD)
|
||||
.Where(ch => CharUnicodeInfo.GetUnicodeCategory(ch) !=
|
||||
UnicodeCategory.NonSpacingMark)
|
||||
).Normalize(NormalizationForm.FormC);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the cultures.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user