include acoustID in settings page. foundation for verification flow
This commit is contained in:
parent
cee5590718
commit
fa808e5bba
4 changed files with 31 additions and 1 deletions
|
|
@ -2329,7 +2329,7 @@ def handle_settings():
|
||||||
if 'active_media_server' in new_settings:
|
if 'active_media_server' in new_settings:
|
||||||
config_manager.set_active_media_server(new_settings['active_media_server'])
|
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', 'listenbrainz']:
|
for service in ['spotify', 'plex', 'jellyfin', 'navidrome', 'soulseek', 'download_source', 'settings', 'database', 'metadata_enhancement', 'file_organization', 'playlist_sync', 'tidal', 'listenbrainz', 'acoustid']:
|
||||||
if service in new_settings:
|
if service in new_settings:
|
||||||
for key, value in new_settings[service].items():
|
for key, value in new_settings[service].items():
|
||||||
config_manager.set(f'{service}.{key}', value)
|
config_manager.set(f'{service}.{key}', value)
|
||||||
|
|
|
||||||
|
|
@ -2618,6 +2618,26 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- AcoustID Settings -->
|
||||||
|
<div class="api-service-frame">
|
||||||
|
<h4 class="service-title acoustid-title">AcoustID</h4>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>API Key:</label>
|
||||||
|
<input type="password" id="acoustid-api-key"
|
||||||
|
placeholder="AcoustID API Key (Optional)">
|
||||||
|
</div>
|
||||||
|
<div class="callback-info">
|
||||||
|
<div class="callback-help">Get your free API key from <a
|
||||||
|
href="https://acoustid.org/new-application" target="_blank"
|
||||||
|
style="color: #ba55d3;">AcoustID Applications</a></div>
|
||||||
|
<div class="callback-help"
|
||||||
|
style="opacity: 0.7; font-size: 0.85em; margin-top: 4px;">
|
||||||
|
Optional: Enables audio fingerprint verification of downloads. If not
|
||||||
|
provided, verification is skipped.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Test Connection Buttons -->
|
<!-- Test Connection Buttons -->
|
||||||
<div class="api-test-buttons">
|
<div class="api-test-buttons">
|
||||||
<button class="test-button" onclick="testConnection('spotify')">Test
|
<button class="test-button" onclick="testConnection('spotify')">Test
|
||||||
|
|
|
||||||
|
|
@ -1677,6 +1677,9 @@ async function loadSettingsData() {
|
||||||
// Populate ListenBrainz settings
|
// Populate ListenBrainz settings
|
||||||
document.getElementById('listenbrainz-token').value = settings.listenbrainz?.token || '';
|
document.getElementById('listenbrainz-token').value = settings.listenbrainz?.token || '';
|
||||||
|
|
||||||
|
// Populate AcoustID settings
|
||||||
|
document.getElementById('acoustid-api-key').value = settings.acoustid?.api_key || '';
|
||||||
|
|
||||||
// Populate Download settings (right column)
|
// Populate Download settings (right column)
|
||||||
document.getElementById('download-path').value = settings.soulseek?.download_path || './downloads';
|
document.getElementById('download-path').value = settings.soulseek?.download_path || './downloads';
|
||||||
document.getElementById('transfer-path').value = settings.soulseek?.transfer_path || './Transfer';
|
document.getElementById('transfer-path').value = settings.soulseek?.transfer_path || './Transfer';
|
||||||
|
|
@ -2075,6 +2078,9 @@ async function saveSettings() {
|
||||||
listenbrainz: {
|
listenbrainz: {
|
||||||
token: document.getElementById('listenbrainz-token').value
|
token: document.getElementById('listenbrainz-token').value
|
||||||
},
|
},
|
||||||
|
acoustid: {
|
||||||
|
api_key: document.getElementById('acoustid-api-key').value
|
||||||
|
},
|
||||||
download_source: {
|
download_source: {
|
||||||
mode: document.getElementById('download-source-mode').value,
|
mode: document.getElementById('download-source-mode').value,
|
||||||
hybrid_primary: document.getElementById('hybrid-primary-source').value,
|
hybrid_primary: document.getElementById('hybrid-primary-source').value,
|
||||||
|
|
|
||||||
|
|
@ -1106,6 +1106,10 @@ body {
|
||||||
color: #eb743b;
|
color: #eb743b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.acoustid-title {
|
||||||
|
color: #ba55d3;
|
||||||
|
}
|
||||||
|
|
||||||
/* Server Toggle Buttons */
|
/* Server Toggle Buttons */
|
||||||
.server-toggle-container {
|
.server-toggle-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue