diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-09-22 08:51:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-22 08:51:54 -0500 |
| commit | 26ac1164d581ae2a9fc5d195d32b42e2cbb954d0 (patch) | |
| tree | 93eb96ac9fa4cc99ce6783d97df73c2ddda93d2a /src/slskd/Application.cs | |
| parent | 9bb986d218c1e56a988e25dc92b0778471788f50 (diff) | |
| parent | a860ffdf0a6f016eee88859728db552c42c63233 (diff) | |
| download | slskd-26ac1164d581ae2a9fc5d195d32b42e2cbb954d0.tar.gz | |
Merge pull request #653 from slskd/in-place-scan
Update existing shared file database instead of creating a new one for each scan
Diffstat (limited to 'src/slskd/Application.cs')
| -rw-r--r-- | src/slskd/Application.cs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index cab2b649..20735ead 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -29,8 +29,8 @@ namespace slskd using System.Net.Sockets; using System.Reflection; using System.Runtime; - using System.Text.RegularExpressions; using System.Runtime.InteropServices; + using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.SignalR; @@ -383,6 +383,7 @@ namespace slskd } else { + // todo: should this be forced prior to connection if the cache can't be loaded? _ = Shares.StartScanAsync(); } } @@ -989,17 +990,8 @@ namespace slskd SharesRefreshStarted = DateTime.UtcNow; State.SetValue(s => s with { Shares = current }); - Log.Information("Share scan started"); - try - { - System.IO.File.Delete(Path.Combine(Program.DataDirectory, "browse.cache")); - Log.Information("Cleared browse response cache"); - } - catch - { - // noop - } + Log.Information("Share scan started"); } else if (previous.Scanning && !current.Scanning) { |
