The Free Software Media System - Server Backend & API
Add StringComparison
Cody Robiberoeeb819260262
diff --git a/Emby.Server.Implementations/Library/PathExtensions.cs b/Emby.Server.Implementations/Library/PathExtensions.csindex 78850c149e..3fcbb4d65f 100644--- a/Emby.Server.Implementations/Library/PathExtensions.cs+++ b/Emby.Server.Implementations/Library/PathExtensions.cs@@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.Librarythrow 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.var maxIndex = str.Length - attribute.Length - 3;@@ -47,7 +47,7 @@ namespace Emby.Server.Implementations.Library}str = str[attributeEnd..];- attributeIndex = str.IndexOf(attribute);+ attributeIndex = str.IndexOf(attribute, StringComparison.OrdinalIgnoreCase);}// for imdbid we also accept pattern matching