Address comments
This commit is contained in:
parent
8e7b15285e
commit
c2b5fb78ce
|
@ -3315,7 +3315,7 @@ namespace Emby.Server.Implementations.Data
|
|||
|
||||
for (int i = 0; i < str.Length; i++)
|
||||
{
|
||||
if (!char.IsLetter(str[i]) && (!char.IsNumber(str[i])))
|
||||
if (!char.IsLetter(str[i]) && !char.IsNumber(str[i]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -3646,18 +3646,19 @@ namespace Emby.Server.Implementations.Data
|
|||
int trailerTypesLen = trailerTypes.Length;
|
||||
if (trailerTypesLen > 0)
|
||||
{
|
||||
const string Or = " OR ";
|
||||
StringBuilder clause = new StringBuilder("(", trailerTypesLen * 32);
|
||||
for (int i = 0; i < trailerTypesLen; i++)
|
||||
{
|
||||
var paramName = "@TrailerTypes" + i;
|
||||
clause.Append("TrailerTypes like ")
|
||||
.Append(paramName)
|
||||
.Append(" OR ");
|
||||
.Append(Or);
|
||||
statement?.TryBind(paramName, "%" + trailerTypes[i] + "%");
|
||||
}
|
||||
|
||||
// Remove last " OR "
|
||||
clause.Length -= 4;
|
||||
clause.Length -= Or.Length;
|
||||
clause.Append(')');
|
||||
|
||||
whereClauses.Add(clause.ToString());
|
||||
|
|
|
@ -24,7 +24,6 @@ namespace MediaBrowser.Controller.Persistence
|
|||
/// Deletes the item.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
void DeleteItem(Guid id);
|
||||
|
||||
/// <summary>
|
||||
|
@ -169,4 +168,3 @@ namespace MediaBrowser.Controller.Persistence
|
|||
List<string> GetAllArtistNames();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user