Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
4t145 committed Oct 30, 2023
1 parent 6d4dd5b commit 23afde3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ version = "0.3"

[dependencies.bilibili-client]
git = "https://github.com/4t145/bilibili-client.git"
rev = "7cd2683"
# rev = "7cd2683"
# path = "C:\\Users\\27970\\Desktop\\bilibili-client"
features = ["live"]
default-features = false

Expand Down Expand Up @@ -97,3 +98,5 @@ json = []
[dev-dependencies]
env_logger = "0.10"
toml = "0.8.6"
tracing = "0.1.40"
tracing-subscriber = "0.3.17"
5 changes: 1 addition & 4 deletions examples/using-tokio/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ use bilibili_client::reqwest_client::LoginInfo;
use bilive_danmaku::Connector;
use futures_util::StreamExt;
fn main() {
if std::env::var("RUST_LOG").is_err() {
std::env::set_var("RUST_LOG", "debug,bilive_danmaku=debug");
}
env_logger::init();
tracing_subscriber::fmt().with_level(true).with_max_level(tracing::Level::DEBUG).init();
let rt = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
Expand Down
4 changes: 2 additions & 2 deletions src/connector.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{connection::*, packet::*};
use bilibili_client::{
api::live::{
danmu_info::RoomPlayInfo,
danmu_info::RoomInfo,
room_play_info::{DanmuInfoData, Host},
},
reqwest_client::LoginInfo,
Expand All @@ -25,7 +25,7 @@ impl Connector {
) -> bilibili_client::reqwest_client::ClientResult<Self> {
let client = bilibili_client::reqwest_client::Client::default();
client.set_login_info(&login_info);
let RoomPlayInfo { room_id, uid } = client.get_room_play_info(roomid).await?;
let RoomInfo { room_id, uid } = client.get_room_play_info(roomid).await?;
roomid = room_id;
let DanmuInfoData { token, host_list } = client.get_danmu_info(room_id).await?;
let connector = Connector {
Expand Down

0 comments on commit 23afde3

Please sign in to comment.