From 1e7a046f5ec4e0796ea7fbe8c3594e83b566e9dc Mon Sep 17 00:00:00 2001 From: xxxxuanran Date: Fri, 2 Aug 2024 22:18:49 +0800 Subject: [PATCH] add alia --- crates/biliup/src/uploader/line.rs | 9 +++++++++ crates/bin/cli.rs | 3 ++- crates/bin/uploader.rs | 1 + crates/stream-gears/src/uploader.rs | 5 ++++- crates/stream-gears/stream_gears/stream_gears.pyi | 3 +++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/crates/biliup/src/uploader/line.rs b/crates/biliup/src/uploader/line.rs index f8a6446..271adc6 100644 --- a/crates/biliup/src/uploader/line.rs +++ b/crates/biliup/src/uploader/line.rs @@ -317,4 +317,13 @@ pub fn bda() -> Line { probe_url: "//upos-cs-upcdnbda.bilivideo.com/OK".into(), cost: 0, } +} + +pub fn alia() -> Line { + Line { + os: Uploader::Upos, + query: "zone=cs&upcdn=alia&probe_version=20221109".into(), + probe_url: "//upos-cs-upcdnalia.bilivideo.com/OK".into(), + cost: 0, + } } \ No newline at end of file diff --git a/crates/bin/cli.rs b/crates/bin/cli.rs index 064af31..b006cb9 100644 --- a/crates/bin/cli.rs +++ b/crates/bin/cli.rs @@ -146,7 +146,8 @@ pub enum UploadLine { Bldsa, Tx, Txa, - Bda + Bda, + Alia } #[derive(Debug, Clone, ValueEnum)] diff --git a/crates/bin/uploader.rs b/crates/bin/uploader.rs index 92b7534..2115ade 100644 --- a/crates/bin/uploader.rs +++ b/crates/bin/uploader.rs @@ -228,6 +228,7 @@ pub async fn upload( Some(UploadLine::Tx) => line::tx(), Some(UploadLine::Txa) => line::txa(), Some(UploadLine::Bda) => line::bda(), + Some(UploadLine::Alia) => line::alia(), None => Probe::probe(&client.client).await.unwrap_or_default(), }; // let line = line::kodo(); diff --git a/crates/stream-gears/src/uploader.rs b/crates/stream-gears/src/uploader.rs index a4d9e4e..b81762f 100644 --- a/crates/stream-gears/src/uploader.rs +++ b/crates/stream-gears/src/uploader.rs @@ -27,7 +27,8 @@ pub enum UploadLine { Bldsa, Tx, Txa, - Bda + Bda, + Alia } #[derive(FromPyObject)] @@ -116,6 +117,7 @@ pub async fn upload(studio_pre: StudioPre) -> Result { Some(UploadLine::Tx) => line::tx(), Some(UploadLine::Txa) => line::txa(), Some(UploadLine::Bldsa) => line::bldsa(), + Some(UploadLine::Alia) => line::alia(), None => Probe::probe(&client.client).await.unwrap_or_default(), }; for video_path in video_path { @@ -237,6 +239,7 @@ pub async fn upload_by_app(studio_pre: StudioPre) -> Result { Some(UploadLine::Tx) => line::tx(), Some(UploadLine::Txa) => line::txa(), Some(UploadLine::Bldsa) => line::bldsa(), + Some(UploadLine::Alia) => line::alia(), None => Probe::probe(&client.client).await.unwrap_or_default(), }; for video_path in video_path { diff --git a/crates/stream-gears/stream_gears/stream_gears.pyi b/crates/stream-gears/stream_gears/stream_gears.pyi index 16ef1b8..30fe05a 100644 --- a/crates/stream-gears/stream_gears/stream_gears.pyi +++ b/crates/stream-gears/stream_gears/stream_gears.pyi @@ -132,6 +132,9 @@ class UploadLine(Enum): Bldsa = 7 """Bldsa""" + Alia = 8 + """阿里云upos""" + def upload(video_path: List[str], cookie_file: str,