Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new upload line alia #165

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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