From 37fd4e0a28de6249abd4e4dec15e22e10cf44936 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 28 Dec 2025 16:38:52 -0600 Subject: use enums with categories instead of ints to avoid SQLite casting --- src/slskd/Application.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/slskd/Application.cs') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 6b66ec6e..c740bbad 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -316,7 +316,7 @@ namespace slskd // records to be updated if the application has started to shut down so that we can do this cleanup and properly // disposition them as having failed due to an application shutdown, instead of some random exception thrown while // things are being disposed. - var activeUploads = Transfers.Uploads.List(t => t.EndedAt == null || !t.State.HasFlag(TransferStates.Completed), includeRemoved: true); + var activeUploads = Transfers.Uploads.List(t => t.EndedAt == null || !TransferStateCategories.Completed.Contains(t.State), includeRemoved: true); foreach (var upload in activeUploads) { @@ -327,7 +327,7 @@ namespace slskd Transfers.Uploads.Update(upload); } - var activeDownloads = Transfers.Downloads.List(t => t.EndedAt == null || !t.State.HasFlag(TransferStates.Completed), includeRemoved: true); + var activeDownloads = Transfers.Downloads.List(t => t.EndedAt == null || !TransferStateCategories.Completed.Contains(t.State), includeRemoved: true); foreach (var download in activeDownloads) { -- cgit v1.2.3