async fn ensure_library( pool: &SqlitePool, path: &str, name: &str, ) -> Result<i64, Error>
Ensures the library row exists and returns its id.