feat(scanner): add debounced file watching with polling fallback
- Implement event queue with 3-second debouncing for file system events - Add configurable polling fallback (default 3 min) via SCAN_POLL_INTERVAL_MINUTES - Add SyncFilesystemWithDatabase to detect orphaned DB entries and new files - Integrate utils.ResolveMediaURL for consistent media file path resolution - Add COOKIE_SECURE env var with SameSite=LaxMode for session cookies - Update media handler to properly decode URL paths for file serving - Refactor scanner initialization to accept poll interval configuration
This commit is contained in:
@@ -13,7 +13,7 @@ func registerSyncRoutes(cfg *Config) {
|
||||
protected := e.Group("/api", jwtMiddleware)
|
||||
|
||||
// Create handler for sync-specific routes
|
||||
h := handlers.NewHandler(cfg.Queries, cfg.ConnManager, cfg.QueueProcessor)
|
||||
h := handlers.NewHandler(cfg.Queries, cfg.ConnManager, cfg.QueueProcessor, cfg.Cfg)
|
||||
|
||||
// Book matching and unlinked book resolution routes
|
||||
sync := protected.Group("/sync")
|
||||
|
||||
Reference in New Issue
Block a user