feat: Add NFO configuration settings (Task 7)
- Added NFOConfig model with TMDB API key, auto-create, media downloads, image size settings - Created NFO settings section in UI with form fields and validation - Implemented nfo-config.js module for loading, saving, and testing TMDB connection - Added TMDB API key validation endpoint (POST /api/config/tmdb/validate) - Integrated NFO config into AppConfig and ConfigUpdate models - Added 5 unit tests for NFO config model validation - Added API test for TMDB validation endpoint - All 16 config model tests passing, all 10 config API tests passing - Documented in docs/task7_status.md (100% complete)
This commit is contained in:
@@ -53,6 +53,9 @@ AniWorld.ConfigManager = (function() {
|
||||
// Main configuration
|
||||
bindMainEvents();
|
||||
|
||||
// NFO configuration
|
||||
bindNFOEvents();
|
||||
|
||||
// Status panel
|
||||
const closeStatus = document.getElementById('close-status');
|
||||
if (closeStatus) {
|
||||
@@ -115,6 +118,21 @@ AniWorld.ConfigManager = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind NFO config events
|
||||
*/
|
||||
function bindNFOEvents() {
|
||||
const saveNFO = document.getElementById('save-nfo-config');
|
||||
if (saveNFO) {
|
||||
saveNFO.addEventListener('click', AniWorld.NFOConfig.save);
|
||||
}
|
||||
|
||||
const testTMDB = document.getElementById('test-tmdb-connection');
|
||||
if (testTMDB) {
|
||||
testTMDB.addEventListener('click', AniWorld.NFOConfig.testTMDBConnection);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind main configuration events
|
||||
*/
|
||||
@@ -197,6 +215,7 @@ AniWorld.ConfigManager = (function() {
|
||||
await AniWorld.SchedulerConfig.load();
|
||||
await AniWorld.LoggingConfig.load();
|
||||
await AniWorld.AdvancedConfig.load();
|
||||
await AniWorld.NFOConfig.load();
|
||||
|
||||
modal.classList.remove('hidden');
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user