mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 06:23:03 +03:00
Use string builder instead of string interpolation
This commit is contained in:
@@ -3618,7 +3618,7 @@ namespace Emby.Server.Implementations.Data
|
|||||||
}
|
}
|
||||||
else if (excludeTypes.Length > 1)
|
else if (excludeTypes.Length > 1)
|
||||||
{
|
{
|
||||||
var whereBuilder = new StringBuilder();
|
var whereBuilder = new StringBuilder("type not in (");
|
||||||
foreach (var excludeType in excludeTypes)
|
foreach (var excludeType in excludeTypes)
|
||||||
{
|
{
|
||||||
if (_baseItemKindNames.TryGetValue(excludeType, out var baseItemKindName))
|
if (_baseItemKindNames.TryGetValue(excludeType, out var baseItemKindName))
|
||||||
@@ -3636,7 +3636,8 @@ namespace Emby.Server.Implementations.Data
|
|||||||
|
|
||||||
// Remove trailing comma.
|
// Remove trailing comma.
|
||||||
whereBuilder.Length--;
|
whereBuilder.Length--;
|
||||||
whereClauses.Add($"type not in ({whereBuilder})");
|
whereBuilder.Append(')');
|
||||||
|
whereClauses.Add(whereBuilder.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (includeTypes.Length == 1)
|
else if (includeTypes.Length == 1)
|
||||||
@@ -3653,7 +3654,7 @@ namespace Emby.Server.Implementations.Data
|
|||||||
}
|
}
|
||||||
else if (includeTypes.Length > 1)
|
else if (includeTypes.Length > 1)
|
||||||
{
|
{
|
||||||
var whereBuilder = new StringBuilder();
|
var whereBuilder = new StringBuilder("type in (");
|
||||||
foreach (var includeType in includeTypes)
|
foreach (var includeType in includeTypes)
|
||||||
{
|
{
|
||||||
if (_baseItemKindNames.TryGetValue(includeType, out var baseItemKindName))
|
if (_baseItemKindNames.TryGetValue(includeType, out var baseItemKindName))
|
||||||
@@ -3671,7 +3672,8 @@ namespace Emby.Server.Implementations.Data
|
|||||||
|
|
||||||
// Remove trailing comma.
|
// Remove trailing comma.
|
||||||
whereBuilder.Length--;
|
whereBuilder.Length--;
|
||||||
whereClauses.Add($"type in ({whereBuilder})");
|
whereBuilder.Append(')');
|
||||||
|
whereClauses.Add(whereBuilder.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.ChannelIds.Count == 1)
|
if (query.ChannelIds.Count == 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user