aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares/ShareService.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-09-27 09:16:15 -0500
committerJP Dillingham <jp@dillingham.me>2022-09-27 09:16:15 -0500
commit2989def8f55ef54571ea19635f6613c3358e3650 (patch)
tree48089348064c63a3719fd0007631ae183b3cd6a9 /src/slskd/Shares/ShareService.cs
parentb1fd4801196ac8d69355f604dd615b1052696961 (diff)
downloadslskd-2989def8f55ef54571ea19635f6613c3358e3650.tar.gz
split most of the db logic into ShareRepository
Diffstat (limited to 'src/slskd/Shares/ShareService.cs')
-rw-r--r--src/slskd/Shares/ShareService.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/slskd/Shares/ShareService.cs b/src/slskd/Shares/ShareService.cs
index 4307a98f..22bebb95 100644
--- a/src/slskd/Shares/ShareService.cs
+++ b/src/slskd/Shares/ShareService.cs
@@ -63,6 +63,8 @@ namespace slskd.Shares
});
});
+ Repository = new ShareRepository(connectionString: Program.ConnectionStrings.Shares);
+
OptionsMonitor = optionsMonitor;
OptionsMonitor.OnChange(options => Configure(options));
@@ -80,6 +82,7 @@ namespace slskd.Shares
public IStateMonitor<ShareState> StateMonitor => State;
private ISharedFileCache Cache { get; }
+ private IShareRepository Repository { get; }
private string LastOptionsHash { get; set; }
private IOptionsMonitor<Options> OptionsMonitor { get; }
private List<Share> SharesList { get; set; } = new List<Share>();