mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-03 21:54:26 -04:00
Add StringComparison
This commit is contained in:
parent
593b2fd359
commit
eeb8192602
@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
throw new ArgumentException("String can't be empty.", nameof(attribute));
|
throw new ArgumentException("String can't be empty.", nameof(attribute));
|
||||||
}
|
}
|
||||||
|
|
||||||
var attributeIndex = str.IndexOf(attribute);
|
var attributeIndex = str.IndexOf(attribute, StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
// Must be at least 3 characters after the attribute =, ], any character.
|
// Must be at least 3 characters after the attribute =, ], any character.
|
||||||
var maxIndex = str.Length - attribute.Length - 3;
|
var maxIndex = str.Length - attribute.Length - 3;
|
||||||
@ -47,7 +47,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
}
|
}
|
||||||
|
|
||||||
str = str[attributeEnd..];
|
str = str[attributeEnd..];
|
||||||
attributeIndex = str.IndexOf(attribute);
|
attributeIndex = str.IndexOf(attribute, StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
// for imdbid we also accept pattern matching
|
// for imdbid we also accept pattern matching
|
||||||
|
Loading…
x
Reference in New Issue
Block a user