diff --git a/crates/bili_sync/src/api/routes/videos/mod.rs b/crates/bili_sync/src/api/routes/videos/mod.rs index a6b1db5..d0f04c1 100644 --- a/crates/bili_sync/src/api/routes/videos/mod.rs +++ b/crates/bili_sync/src/api/routes/videos/mod.rs @@ -45,7 +45,11 @@ pub async fn get_videos( } } if let Some(query_word) = params.query { - query = query.filter(video::Column::Name.contains(query_word)); + query = query.filter( + video::Column::Name + .contains(&query_word) + .or(video::Column::Bvid.contains(query_word)), + ); } let total_count = query.clone().count(&db).await?; let (page, page_size) = if let (Some(page), Some(page_size)) = (params.page, params.page_size) { diff --git a/web/src/routes/videos/+page.svelte b/web/src/routes/videos/+page.svelte index 5a014e4..b5bc4df 100644 --- a/web/src/routes/videos/+page.svelte +++ b/web/src/routes/videos/+page.svelte @@ -185,7 +185,7 @@