aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-09-05 12:42:12 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-09-05 12:42:12 -0500
commitab99deace640229c91c4b8e4581cd9351e542eb2 (patch)
tree33ec06530666a1b84004a6e32c7976748267c263 /src
parentb2b4343a9fa973d16e9de14dd467737fc0b0a706 (diff)
downloadslskd-ab99deace640229c91c4b8e4581cd9351e542eb2.tar.gz
detect room config changes and auto-join
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application/Application.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/slskd/Application/Application.cs b/src/slskd/Application/Application.cs
index f7488ef3..d5c0dcff 100644
--- a/src/slskd/Application/Application.cs
+++ b/src/slskd/Application/Application.cs
@@ -1,4 +1,4 @@
-// <copyright file="Application.cs" company="slskd Team">
+// <copyright file="Application.cs" company="slskd Team">
// Copyright (c) slskd Team. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
@@ -248,6 +248,13 @@ namespace slskd
Logger.Information("File filter configuration changed. Shares must be re-scanned for changes to take effect.");
}
+ if (PreviousOptions.Rooms.Except(newOptions.Rooms).Any()
+ || newOptions.Rooms.Except(PreviousOptions.Rooms).Any())
+ {
+ Logger.Information("Room configuration changed. Joining any newly added rooms.");
+ _ = AutoJoinRooms(newOptions.Rooms);
+ }
+
// determine whether any Soulseek options changed. if so, we need to construct a patch
// and invoke ReconfigureOptionsAsync().
var slskDiff = PreviousOptions.Soulseek.DiffWith(newOptions.Soulseek);