fix: persist FileBrowser database + sync on manual storage add

- Add server.database to generated config.yaml pointing to the
  persistent data volume. Previously the database was at
  /home/filebrowser/database.db (outside the volume) and was lost
  on every container recreation.
- Call syncFileBrowserMounts after manual storage path add, so newly
  registered drives (like sys_drive) also appear in FileBrowser.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 22:19:26 +01:00
parent 91c12c4b8b
commit b06e9bb368
+2
View File
@@ -1166,6 +1166,7 @@ func (s *Server) settingsStorageAddHandler(w http.ResponseWriter, r *http.Reques
} }
s.logger.Printf("[INFO] Storage path added: %s (%s)", path, label) s.logger.Printf("[INFO] Storage path added: %s (%s)", path, label)
go s.syncFileBrowserMounts()
http.Redirect(w, r, "/settings?storage_msg=success&storage_detail="+url.QueryEscape("Adattároló sikeresen hozzáadva: "+path), http.StatusFound) http.Redirect(w, r, "/settings?storage_msg=success&storage_detail="+url.QueryEscape("Adattároló sikeresen hozzáadva: "+path), http.StatusFound)
} }
@@ -1404,6 +1405,7 @@ func generateFileBrowserConfig(paths []settings.StoragePath) string {
server: server:
port: 80 port: 80
baseURL: "/" baseURL: "/"
database: "/home/filebrowser/data/database.db"
logging: logging:
- levels: "info|warning|error" - levels: "info|warning|error"
sources: sources: