Select the types of activity you want to include in your feed.
Wait for Typesense before HTTP calls
Ensure the Typesense subprocess is accepting connections before any collection/indexing HTTP calls. Remove the redundant wait and replace a panic-inducing unwrap with a warning log to avoid crashing on failures
···150150 rt.block_on(async {
151151 rockbox_typesense::setup()?;
152152153153+ // Wait for Typesense to accept connections before any HTTP calls.
154154+ // The subprocess thread starts typesense-server concurrently, so it
155155+ // may not be listening yet when we reach the first collection call.
156156+ wait_for_typesense().await;
157157+153158 let pool = create_connection_pool().await?;
154159 let tracks = repo::track::all(pool.clone()).await?;
155160 if tracks.is_empty() || update_library {
···170175 insert_albums(albums.into_iter().map(Album::from).collect()).await?;
171176 }
172177173173- // Always sync playlists on startup so the collection exists even when the
174174- // library scan was skipped. Wait for Typesense to be ready first since it
175175- // may still be starting when tracks are already indexed (no scan delay).
176176- wait_for_typesense().await;
177178 create_playlists_collection().await?;
178179 let playlist_store = PlaylistStore::new(pool.clone());
179180 let saved = playlist_store.list().await.unwrap_or_default();
···205206 }
206207 Ok::<(), Error>(())
207208 })
208208- .unwrap();
209209+ .unwrap_or_else(|e| warn!("Library indexing failed: {}", e));
209210210211 thread::spawn(move || {
211212 sleep(Duration::from_secs(5));