From 49705f6f453ec34564ffbf68449b715f45ae0bbf Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Thu, 31 Oct 2024 12:38:01 +0100 Subject: [PATCH] fix: don't send xrefs for non-existing files in APIv3 we still might want to keep them in the db in case the file is ever added back, but we don't want it to show up in the normal APIs. --- Shoko.Server/API/v3/Models/Shoko/FileCrossReference.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Shoko.Server/API/v3/Models/Shoko/FileCrossReference.cs b/Shoko.Server/API/v3/Models/Shoko/FileCrossReference.cs index 06e66d043..bfee149e3 100644 --- a/Shoko.Server/API/v3/Models/Shoko/FileCrossReference.cs +++ b/Shoko.Server/API/v3/Models/Shoko/FileCrossReference.cs @@ -140,6 +140,7 @@ private static int PercentageToFileCount(int percentage) public static List From(IEnumerable crossReferences) => crossReferences + .Where(xref => xref.Video is not null) .Select(xref => { // Percentages.