mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Add drm check
This commit is contained in:
parent
287df84382
commit
8047680799
1 changed files with 5 additions and 0 deletions
|
|
@ -27,6 +27,11 @@ pub async fn stream_data_from_stream(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
if videos.iter().any(|v| v.drm.is_some()) || audios.iter().any(|v| v.drm.is_some()) {
|
||||||
|
bail!("Stream is DRM protected")
|
||||||
|
}
|
||||||
|
|
||||||
videos.sort_by(|a, b| a.bandwidth.cmp(&b.bandwidth).reverse());
|
videos.sort_by(|a, b| a.bandwidth.cmp(&b.bandwidth).reverse());
|
||||||
audios.sort_by(|a, b| a.bandwidth.cmp(&b.bandwidth).reverse());
|
audios.sort_by(|a, b| a.bandwidth.cmp(&b.bandwidth).reverse());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue