mirror of
https://github.com/lanyeeee/bilibili-video-downloader.git
synced 2026-09-09 01:27:27 +08:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a920804c93 | ||
|
|
843203c043 | ||
|
|
650ae0f6ca |
@@ -385,7 +385,7 @@ impl BiliClient {
|
|||||||
"bvid": bvid,
|
"bvid": bvid,
|
||||||
"cid": cid,
|
"cid": cid,
|
||||||
"qn": 127,
|
"qn": 127,
|
||||||
"fnval": 139216,
|
"fnval": 4048,
|
||||||
});
|
});
|
||||||
// 发送获取普通url的请求
|
// 发送获取普通url的请求
|
||||||
let request = self
|
let request = self
|
||||||
|
|||||||
@@ -217,6 +217,9 @@ impl DownloadProgress {
|
|||||||
|
|
||||||
self.prepare(app).await.wrap_err("准备下载失败")?;
|
self.prepare(app).await.wrap_err("准备下载失败")?;
|
||||||
|
|
||||||
|
self.completed_ts = None; // 重置完成时间戳
|
||||||
|
download_task.update_progress(|p| *p = self.clone());
|
||||||
|
|
||||||
let progress_before_hook = self.clone();
|
let progress_before_hook = self.clone();
|
||||||
app.get_plugin_manager()
|
app.get_plugin_manager()
|
||||||
.run_hook(HookContext::AfterPrepare(AfterPrepareContext::new(self)))
|
.run_hook(HookContext::AfterPrepare(AfterPrepareContext::new(self)))
|
||||||
@@ -225,9 +228,6 @@ impl DownloadProgress {
|
|||||||
download_task.update_progress(|p| *p = self.clone());
|
download_task.update_progress(|p| *p = self.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
self.completed_ts = None; // 重置完成时间戳
|
|
||||||
download_task.update_progress(|p| *p = self.clone());
|
|
||||||
|
|
||||||
std::fs::create_dir_all(&self.episode_dir)
|
std::fs::create_dir_all(&self.episode_dir)
|
||||||
.wrap_err(format!("创建目录`{}`失败", self.episode_dir.display()))?;
|
.wrap_err(format!("创建目录`{}`失败", self.episode_dir.display()))?;
|
||||||
|
|
||||||
@@ -250,6 +250,7 @@ impl DownloadProgress {
|
|||||||
tracing::debug!("音频下载任务完成");
|
tracing::debug!("音频下载任务完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*self = download_task.progress.read().clone();
|
||||||
let progress_before_hook = self.clone();
|
let progress_before_hook = self.clone();
|
||||||
app.get_plugin_manager()
|
app.get_plugin_manager()
|
||||||
.run_hook(HookContext::BeforeVideoProcess(
|
.run_hook(HookContext::BeforeVideoProcess(
|
||||||
@@ -324,6 +325,7 @@ impl DownloadProgress {
|
|||||||
download_task.update_progress(|p| p.completed_ts = Some(completed_ts));
|
download_task.update_progress(|p| p.completed_ts = Some(completed_ts));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*self = download_task.progress.read().clone();
|
||||||
let progress_before_hook = self.clone();
|
let progress_before_hook = self.clone();
|
||||||
app.get_plugin_manager()
|
app.get_plugin_manager()
|
||||||
.run_hook(HookContext::OnCompleted(OnCompletedContext::new(self)))
|
.run_hook(HookContext::OnCompleted(OnCompletedContext::new(self)))
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ pub struct PaidJump {
|
|||||||
pub struct Payment {
|
pub struct Payment {
|
||||||
pub bp_enough: i64,
|
pub bp_enough: i64,
|
||||||
pub desc: String,
|
pub desc: String,
|
||||||
pub my_bp: i64,
|
pub my_bp: f64,
|
||||||
pub pay_shade: String,
|
pub pay_shade: String,
|
||||||
pub price: f64,
|
pub price: f64,
|
||||||
pub price_format: String,
|
pub price_format: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user