Skip to content

Commit

Permalink
hls: fix some special clip url
Browse files Browse the repository at this point in the history
  • Loading branch information
THMonster committed Oct 4, 2023
1 parent 8a1a977 commit 6404343
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.3.0"
version = "5.3.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
6 changes: 5 additions & 1 deletion src/streamer/hls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ impl HLS {
} else {
let url = url::Url::parse(&self.url)?;
let url2 = url.join(&clip)?;
format!("{}?{}", url2.as_str(), url.query().unwrap_or(""))
if url2.as_str().contains("?") {
url2.as_str().to_string()
} else {
format!("{}?{}", url2.as_str(), url.query().unwrap_or(""))
}
};
Ok(url)
}
Expand Down

0 comments on commit 6404343

Please sign in to comment.