Restructure scraping settings (#1548)

* Change scrapers overview into collapsible per type
* Move scraping configuration to (renamed) scrapers tab

Rename the Scrapers tab to Scraping and move the scraping configuration
to this tab.
This commit is contained in:
gitgiggety
2021-08-04 04:32:58 +02:00
committed by GitHub
parent 518be8ee70
commit ac41416cd7
16 changed files with 242 additions and 107 deletions

View File

@@ -39,6 +39,7 @@ func makeConfigResult() *models.ConfigResult {
General: makeConfigGeneralResult(),
Interface: makeConfigInterfaceResult(),
Dlna: makeConfigDLNAResult(),
Scraping: makeConfigScrapingResult(),
}
}
@@ -132,3 +133,16 @@ func makeConfigDLNAResult() *models.ConfigDLNAResult {
Interfaces: config.GetDLNAInterfaces(),
}
}
func makeConfigScrapingResult() *models.ConfigScrapingResult {
config := config.GetInstance()
scraperUserAgent := config.GetScraperUserAgent()
scraperCDPPath := config.GetScraperCDPPath()
return &models.ConfigScrapingResult{
ScraperUserAgent: &scraperUserAgent,
ScraperCertCheck: config.GetScraperCertCheck(),
ScraperCDPPath: &scraperCDPPath,
}
}