Skip to content

Commit

Permalink
misc: move variables for better time tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Apr 23, 2024
1 parent f23cbab commit 44b20d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Shokofin/SignalR/SignalRConnectionManager.cs
Expand Up @@ -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<string>();
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<string>();
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())
Expand Down

0 comments on commit 44b20d5

Please sign in to comment.