mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 09:14:45 +03:00
Minor improvements
This commit is contained in:
@@ -29,7 +29,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
private readonly ILogger _logger;
|
||||
private readonly ILocalizationManager _localization;
|
||||
|
||||
private List<string> _splitWhiteList = null;
|
||||
private string[] _splitWhiteList;
|
||||
|
||||
public ProbeResultNormalizer(ILogger logger, ILocalizationManager localization)
|
||||
{
|
||||
@@ -37,6 +37,8 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
_localization = localization;
|
||||
}
|
||||
|
||||
private IReadOnlyList<string> SplitWhitelist => _splitWhiteList ??= new string[] { "AC/DC" };
|
||||
|
||||
public MediaInfo GetMediaInfo(InternalMediaInfoResult data, VideoType? videoType, bool isAudio, string path, MediaProtocol protocol)
|
||||
{
|
||||
var info = new MediaInfo
|
||||
@@ -1254,7 +1256,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
|
||||
var artistsFound = new List<string>();
|
||||
|
||||
foreach (var whitelistArtist in GetSplitWhitelist())
|
||||
foreach (var whitelistArtist in SplitWhitelist)
|
||||
{
|
||||
var originalVal = val;
|
||||
val = val.Replace(whitelistArtist, "|", StringComparison.OrdinalIgnoreCase);
|
||||
@@ -1273,11 +1275,6 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
return artistsFound;
|
||||
}
|
||||
|
||||
private IEnumerable<string> GetSplitWhitelist()
|
||||
{
|
||||
return _splitWhiteList ??= new List<string> { "AC/DC" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the studios from the tags collection.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user