diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Extensions/Fts5QueryBuilder.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Extensions/Fts5QueryBuilder.cs
index 6d98af1b62..fbf492637f 100644
--- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Extensions/Fts5QueryBuilder.cs
+++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Extensions/Fts5QueryBuilder.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Text;
namespace Jellyfin.Database.Providers.Sqlite.Extensions;
@@ -32,15 +33,8 @@ public static class Fts5QueryBuilder
var result = new StringBuilder(searchTerm.Length * 2);
var firstWord = true;
- foreach (var word in words)
+ foreach (var cleanWord in words.Select(CleanWord).Where(w => !string.IsNullOrWhiteSpace(w)))
{
- var cleanWord = CleanWord(word);
-
- if (string.IsNullOrWhiteSpace(cleanWord))
- {
- continue;
- }
-
if (!firstWord)
{
result.Append(' ');
@@ -58,12 +52,9 @@ public static class Fts5QueryBuilder
{
var cleaned = new StringBuilder(word.Length);
- foreach (var c in word)
+ foreach (var c in word.Where(c => char.IsLetterOrDigit(c) || c == '-' || c == '_' || c == '\'' || c == '.'))
{
- if (char.IsLetterOrDigit(c) || c == '-' || c == '_' || c == '\'' || c == '.')
- {
- cleaned.Append(c);
- }
+ cleaned.Append(c);
}
return cleaned.ToString();
diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Extensions/SqliteFtsDbFunctions.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Extensions/SqliteFtsDbFunctions.cs
deleted file mode 100644
index 536efe43da..0000000000
--- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Extensions/SqliteFtsDbFunctions.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace Jellyfin.Database.Providers.Sqlite.Extensions;
-
-///
-/// Custom EF Core database functions for SQLite FTS5 operations.
-/// These methods are mapped to SQL functions and should never be called directly in C# code.
-///
-///
-/// Currently empty as FTS implementation uses direct 'WHERE IN' approach with BaseItemFtsEntity.
-/// This class is kept for potential future custom FTS functions.
-///
-public static class SqliteFtsDbFunctions
-{
-}
diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs
index e6b68a33fd..e79fe0a115 100644
--- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs
+++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/SqliteDesignTimeJellyfinDbFactory.cs
@@ -19,7 +19,7 @@ namespace Jellyfin.Database.Providers.Sqlite.Migrations
return new SqliteJellyfinDbContext(
optionsBuilder.Options,
- NullLogger.Instance,
+ NullLogger.Instance,
new SqliteDatabaseProvider(null!, NullLogger.Instance),
new NoLockBehavior(NullLogger.Instance));
}
diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteJellyfinDbContext.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteJellyfinDbContext.cs
index e1537f56af..9b421116c2 100644
--- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteJellyfinDbContext.cs
+++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteJellyfinDbContext.cs
@@ -16,7 +16,7 @@ namespace Jellyfin.Database.Providers.Sqlite;
/// The locking behavior.
public class SqliteJellyfinDbContext(
DbContextOptions options,
- ILogger logger,
+ ILogger logger,
IJellyfinDatabaseProvider jellyfinDatabaseProvider,
IEntityFrameworkCoreLockingBehavior entityFrameworkCoreLocking)
: JellyfinDbContext(options, logger, jellyfinDatabaseProvider, entityFrameworkCoreLocking)