feat: add PostgreSQL persistence and unified sync endpoint
- Add sqlx with PostgreSQL support for database operations - Create DbService with artist/album upsert and listing methods - Add database schema (14 tables) in containers/init.sql - Add library controller (GET /api/library/artists, /albums, /stats) - Merge sync_artist + ingest into single POST /api/sync endpoint - Support configurable sync: download (bool), store (bool), album filter - Connect to database at startup with graceful fallback
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
mod indexer_controller;
|
||||
mod library_controller;
|
||||
mod metadata_controller;
|
||||
mod sync_controller;
|
||||
mod torrent_controller;
|
||||
@@ -29,6 +30,7 @@ pub fn routes(state: AppState) -> Router {
|
||||
.nest("/torrents", torrent_controller::routes())
|
||||
.nest("/metadata", metadata_controller::routes())
|
||||
.nest("/sync", sync_controller::routes())
|
||||
.nest("/library", library_controller::routes())
|
||||
.with_state(state)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user