From faa07c2791d36a21ef4ad922565cff9103711cfb Mon Sep 17 00:00:00 2001 From: Josh Patra Date: Mon, 9 Feb 2026 13:12:21 -0500 Subject: [PATCH] fix: resolve build errors in forwarded headers and config endpoints Fixed duplicate builder variable, deprecated KnownNetworks property, and removed non-existent SpotifyImportSettings properties from config endpoint. --- allstarr/Controllers/AdminController.cs | 3 --- allstarr/Program.cs | 4 +--- allstarr/wwwroot/index.html | 24 +++++------------------- 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/allstarr/Controllers/AdminController.cs b/allstarr/Controllers/AdminController.cs index 2c5142c..ff6f970 100644 --- a/allstarr/Controllers/AdminController.cs +++ b/allstarr/Controllers/AdminController.cs @@ -1398,9 +1398,6 @@ public class AdminController : ControllerBase { enabled = _spotifyImportSettings.Enabled, matchingIntervalHours = _spotifyImportSettings.MatchingIntervalHours, - syncStartHour = _spotifyImportSettings.SyncStartHour, - syncStartMinute = _spotifyImportSettings.SyncStartMinute, - syncWindowHours = _spotifyImportSettings.SyncWindowHours, playlists = _spotifyImportSettings.Playlists.Select(p => new { name = p.Name, diff --git a/allstarr/Program.cs b/allstarr/Program.cs index 0ec5471..4b0c407 100644 --- a/allstarr/Program.cs +++ b/allstarr/Program.cs @@ -27,7 +27,7 @@ builder.Services.Configure(options => // Clear known networks and proxies to accept headers from any proxy // This is safe when running behind a trusted reverse proxy (nginx) - options.KnownNetworks.Clear(); + options.KnownIPNetworks.Clear(); options.KnownProxies.Clear(); // Trust X-Forwarded-* headers from any source @@ -35,8 +35,6 @@ builder.Services.Configure(options => options.ForwardLimit = null; }); -var builder = WebApplication.CreateBuilder(args); - // Decode SquidWTF API base URLs once at startup var squidWtfApiUrls = DecodeSquidWtfUrls(); static List DecodeSquidWtfUrls() diff --git a/allstarr/wwwroot/index.html b/allstarr/wwwroot/index.html index a555fa9..f525c5b 100644 --- a/allstarr/wwwroot/index.html +++ b/allstarr/wwwroot/index.html @@ -997,7 +997,7 @@
-

Sync Schedule

+

Spotify Import Settings

Spotify Import Enabled @@ -1005,19 +1005,9 @@
- Sync Start Time - - - -
-
- Sync Start Minute - - - -
-
- Sync Window - - - + Matching Interval (hours) + - +
@@ -1919,11 +1909,7 @@ // Sync settings document.getElementById('config-spotify-import-enabled').textContent = data.spotifyImport?.enabled ? 'Yes' : 'No'; - const syncHour = data.spotifyImport?.syncStartHour || 0; - const syncMin = data.spotifyImport?.syncStartMinute || 0; - document.getElementById('config-sync-time').textContent = `${String(syncHour).padStart(2, '0')}:${String(syncMin).padStart(2, '0')}`; - document.getElementById('config-sync-minute').textContent = String(syncMin).padStart(2, '0'); - document.getElementById('config-sync-window').textContent = (data.spotifyImport?.syncWindowHours || 24) + ' hours'; + document.getElementById('config-matching-interval').textContent = (data.spotifyImport?.matchingIntervalHours || 24) + ' hours'; } catch (error) { console.error('Failed to fetch config:', error); }