Skip to content

Commit

Permalink
support dolby vision for bilibili
Browse files Browse the repository at this point in the history
fix cookies from chrome
  • Loading branch information
THMonster committed Jan 25, 2025
1 parent d0d909d commit 79b4d94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dmlive"
version = "5.5.5"
version = "5.5.7"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion src/streamfinder/bilibili.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ impl Bilibili {
("bvid", bvid),
("cid", cid),
("qn", String::from("0")),
("fnval", String::from("80")),
("fnval", String::from("848")),
("fnver", String::from("0")),
("fourk", String::from("1")),
];
Expand Down
2 changes: 1 addition & 1 deletion src/utils/cookies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn decrypt_chrome_cookie(data: &mut [u8], key: &[u8; 16]) -> anyhow::Result<Stri
let pt = Aes128CbcDec::new(key.into(), &[32u8; 16].into())
.decrypt_padded_mut::<Pkcs7>(&mut buf)
.map_err(|_| anyhow::anyhow!("decryption failed"))?;
return Ok(String::from_utf8_lossy(pt).into());
return Ok(String::from_utf8_lossy(pt.get(32..).unwrap_or(b"")).into());
} else {
return Err(anyhow::anyhow!("a v10 cookie"));
}
Expand Down

0 comments on commit 79b4d94

Please sign in to comment.