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