Skip to content

Commit

Permalink
add alia (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxxuanran authored Aug 3, 2024
1 parent 2a29729 commit 491ca5c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
9 changes: 9 additions & 0 deletions crates/biliup/src/uploader/line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
3 changes: 2 additions & 1 deletion crates/bin/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ pub enum UploadLine {
Bldsa,
Tx,
Txa,
Bda
Bda,
Alia
}

#[derive(Debug, Clone, ValueEnum)]
Expand Down
1 change: 1 addition & 0 deletions crates/bin/uploader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 4 additions & 1 deletion crates/stream-gears/src/uploader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ pub enum UploadLine {
Bldsa,
Tx,
Txa,
Bda
Bda,
Alia
}

#[derive(FromPyObject)]
Expand Down Expand Up @@ -116,6 +117,7 @@ pub async fn upload(studio_pre: StudioPre) -> Result<ResponseData> {
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 {
Expand Down Expand Up @@ -237,6 +239,7 @@ pub async fn upload_by_app(studio_pre: StudioPre) -> Result<ResponseData> {
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 {
Expand Down
3 changes: 3 additions & 0 deletions crates/stream-gears/stream_gears/stream_gears.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ class UploadLine(Enum):
Bldsa = 7
"""Bldsa"""

Alia = 8
"""阿里云upos"""


def upload(video_path: List[str],
cookie_file: str,
Expand Down

0 comments on commit 491ca5c

Please sign in to comment.