From 44a8be44693ce7388298eba3dcafe45ed45905f8 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:25:23 -0700 Subject: [PATCH] Add Discogs to Settings connections and rate monitor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New Discogs section on Settings → Connections with personal token input - Discogs added as fallback metadata source option alongside iTunes/Deezer - Token saved to discogs.token config key - Discogs added to API rate monitor gauges (60/min with auth) - Help text links to discogs.com/settings/developers for token generation --- core/api_call_tracker.py | 4 +++- web_server.py | 2 +- webui/index.html | 19 ++++++++++++++++++- webui/static/script.js | 12 +++++++++--- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/core/api_call_tracker.py b/core/api_call_tracker.py index 7499c956..b33c7927 100644 --- a/core/api_call_tracker.py +++ b/core/api_call_tracker.py @@ -22,6 +22,7 @@ RATE_LIMITS = { 'audiodb': 30, # MIN_API_INTERVAL=2.0s → ~30/min 'tidal': 120, # MIN_API_INTERVAL=0.5s → ~120/min 'qobuz': 60, # Variable throttle, ~60/min estimate + 'discogs': 60, # MIN_API_INTERVAL=1.0s with auth → ~60/min } # Display names for UI @@ -35,12 +36,13 @@ SERVICE_LABELS = { 'audiodb': 'AudioDB', 'tidal': 'Tidal', 'qobuz': 'Qobuz', + 'discogs': 'Discogs', } # Display order SERVICE_ORDER = [ 'spotify', 'itunes', 'deezer', 'lastfm', 'genius', - 'musicbrainz', 'audiodb', 'tidal', 'qobuz', + 'musicbrainz', 'audiodb', 'tidal', 'qobuz', 'discogs', ] diff --git a/web_server.py b/web_server.py index f2d69dd1..2f06d0df 100644 --- a/web_server.py +++ b/web_server.py @@ -4825,7 +4825,7 @@ def handle_settings(): if 'active_media_server' in new_settings: config_manager.set_active_media_server(new_settings['active_media_server']) - for service in ['spotify', 'plex', 'jellyfin', 'navidrome', 'soulseek', 'download_source', 'settings', 'database', 'metadata_enhancement', 'file_organization', 'playlist_sync', 'tidal', 'tidal_download', 'qobuz', 'hifi_download', 'deezer_download', 'listenbrainz', 'acoustid', 'lastfm', 'genius', 'import', 'lossy_copy', 'listening_stats', 'ui_appearance', 'youtube', 'content_filter', 'itunes', 'm3u_export', 'musicbrainz', 'deezer', 'audiodb', 'metadata', 'hydrabase', 'security']: + for service in ['spotify', 'plex', 'jellyfin', 'navidrome', 'soulseek', 'download_source', 'settings', 'database', 'metadata_enhancement', 'file_organization', 'playlist_sync', 'tidal', 'tidal_download', 'qobuz', 'hifi_download', 'deezer_download', 'listenbrainz', 'acoustid', 'lastfm', 'genius', 'import', 'lossy_copy', 'listening_stats', 'ui_appearance', 'youtube', 'content_filter', 'itunes', 'm3u_export', 'musicbrainz', 'deezer', 'audiodb', 'metadata', 'hydrabase', 'security', 'discogs']: if service in new_settings: for key, value in new_settings[service].items(): config_manager.set(f'{service}.{key}', value) diff --git a/webui/index.html b/webui/index.html index 2eb4a527..030e338b 100644 --- a/webui/index.html +++ b/webui/index.html @@ -4002,6 +4002,22 @@ + +