Update deps & format
This commit is contained in:
@@ -15,7 +15,10 @@ use DownloadError;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Presentation {
|
||||
PublishToGo { name: String, download_url: String },
|
||||
PublishToGo {
|
||||
name: String,
|
||||
download_url: String,
|
||||
},
|
||||
VideoOnDemand {
|
||||
name: String,
|
||||
resource_id: String,
|
||||
@@ -26,8 +29,8 @@ pub enum Presentation {
|
||||
impl Presentation {
|
||||
pub(crate) fn name(&self) -> &str {
|
||||
match *self {
|
||||
Presentation::PublishToGo { ref name, .. } |
|
||||
Presentation::VideoOnDemand { ref name, .. } => name,
|
||||
Presentation::PublishToGo { ref name, .. }
|
||||
| Presentation::VideoOnDemand { ref name, .. } => name,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +64,7 @@ impl Presentation {
|
||||
} => {
|
||||
let response_res = try_to_get_valid_response(
|
||||
|client| {
|
||||
let mut request_builder = client.get(download_url).unwrap();
|
||||
let mut request_builder = client.get(download_url);
|
||||
request_builder.header(construct_cookie());
|
||||
request_builder
|
||||
},
|
||||
@@ -112,14 +115,13 @@ impl Presentation {
|
||||
\"ResourceId\":\"{}\",\
|
||||
\"QueryString\":\"{}\"\
|
||||
}}}}",
|
||||
resource_id,
|
||||
query_string
|
||||
resource_id, query_string
|
||||
);
|
||||
|
||||
let url = "https://streams.tum.de/Mediasite/PlayerService/\
|
||||
PlayerService.svc/json/GetPlayerOptions";
|
||||
let mut res = try_to_get_response(|client| {
|
||||
let mut request_builder = client.post(url).unwrap();
|
||||
let mut request_builder = client.post(url);
|
||||
request_builder
|
||||
.header(construct_cookie())
|
||||
.header(ContentType::json())
|
||||
@@ -144,7 +146,7 @@ impl Presentation {
|
||||
for (i, download_url) in videos.iter().enumerate() {
|
||||
let mut response = try_to_get_valid_response(
|
||||
|client| {
|
||||
let mut request_builder = client.get(download_url).unwrap();
|
||||
let mut request_builder = client.get(download_url);
|
||||
request_builder.header(construct_cookie());
|
||||
request_builder
|
||||
},
|
||||
|
Reference in New Issue
Block a user