Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Add drm check
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed Jun 19, 2024
1 parent 287df84 commit 8047680
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crunchy-cli-core/src/utils/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ pub async fn stream_data_from_stream(
}
}
.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());
audios.sort_by(|a, b| a.bandwidth.cmp(&b.bandwidth).reverse());

Expand Down

0 comments on commit 8047680

Please sign in to comment.