From 44b20d5d7fd8e927f7077b3917ebdc2b1dd8cf02 Mon Sep 17 00:00:00 2001 From: Mikal Stordal Date: Wed, 24 Apr 2024 00:41:00 +0200 Subject: [PATCH] misc: move variables for better time tracking --- Shokofin/SignalR/SignalRConnectionManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shokofin/SignalR/SignalRConnectionManager.cs b/Shokofin/SignalR/SignalRConnectionManager.cs index e225d413..d711fcd3 100644 --- a/Shokofin/SignalR/SignalRConnectionManager.cs +++ b/Shokofin/SignalR/SignalRConnectionManager.cs @@ -372,12 +372,12 @@ private async Task ProcessFileChanges(int fileId, List<(UpdateReason Reason, int locationsToNotify.Add(sourceLocation); continue; } + + var result = new LinkGenerationResult(); + var topFolders = new HashSet(); var vfsLocations = (await Task.WhenAll(seriesIds.Select(seriesId => ResolveManager.GenerateLocationsForFile(mediaFolder, sourceLocation, fileId.ToString(), seriesId))).ConfigureAwait(false)) .Where(tuple => !string.IsNullOrEmpty(tuple.sourceLocation) && tuple.importedAt.HasValue) .ToList(); - - var topFolders = new HashSet(); - var result = new LinkGenerationResult(); foreach (var (srcLoc, symLnks, nfoFls, imprtDt) in vfsLocations) { result += ResolveManager.GenerateSymbolicLinks(srcLoc, symLnks, nfoFls, imprtDt!.Value, result.Paths); foreach (var path in symLnks.Select(path => Path.Join(vfsPath, path[(vfsPath.Length + 1)..].Split(Path.DirectorySeparatorChar).First())).Distinct())