From 247248850c1c8de3ea76ac6e0d4b87064f88b768 Mon Sep 17 00:00:00 2001 From: amtoaer Date: Wed, 27 Mar 2024 20:00:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8F=90=E5=89=8D=20b?= =?UTF-8?q?reak=20=E7=9A=84=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/command.rs | 2 +- src/core/utils.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/command.rs b/src/core/command.rs index 1b0b3a1..8b05ee9 100644 --- a/src/core/command.rs +++ b/src/core/command.rs @@ -25,7 +25,7 @@ pub async fn process_favorite( pin_mut!(video_stream); while let Some(videos_info) = video_stream.next().await { let exist_bvids_pubtimes = - exists_bvids_favtime(&videos_info, fid, connection.as_ref()).await?; + exists_bvids_favtime(&videos_info, favorite_obj.id, connection.as_ref()).await?; let should_break = videos_info .iter() // 出现 bvid 和 fav_time 都相同的记录,说明已经到达了上次处理到的位置 diff --git a/src/core/utils.rs b/src/core/utils.rs index 88cbdc5..ec85461 100644 --- a/src/core/utils.rs +++ b/src/core/utils.rs @@ -58,10 +58,10 @@ pub async fn exists_bvids_favtime( ) .select_only() .columns([video::Column::Bvid, video::Column::Favtime]) + .into_tuple() .all(connection) .await? .into_iter() - .map(|v| (v.bvid, v.favtime)) .collect::>(); Ok(exist_bvid_favtime) } @@ -104,6 +104,7 @@ pub async fn create_videos( .do_nothing() .to_owned(), ) + .do_nothing() .exec(connection) .await?; Ok(()) @@ -166,6 +167,7 @@ pub async fn create_video_pages( .do_nothing() .to_owned(), ) + .do_nothing() .exec(connection) .await?; Ok(())