Skip to content

Commit

Permalink
fix(stream): return streaming url even if server is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
tymmesyde committed Dec 20, 2023
1 parent 6ed89be commit 24579e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/types/resource/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ impl Stream {
}
pub fn streaming_url(&self, streaming_server_url: Option<&Url>) -> Option<String> {
match (&self.source, streaming_server_url) {
(StreamSource::Url { url }, Some(streaming_server_url)) if url.scheme() != "magnet" => {
match &self.behavior_hints.proxy_headers {
Some(StreamProxyHeaders { request, response }) => {
(StreamSource::Url { url }, streaming_server_url) if url.scheme() != "magnet" => {
match (&self.behavior_hints.proxy_headers, streaming_server_url) {
(Some(StreamProxyHeaders { request, response }), Some(streaming_server_url)) => {
let mut streaming_url = streaming_server_url.to_owned();
let mut proxy_query = form_urlencoded::Serializer::new(String::new());
let origin = format!("{}://{}", url.scheme(), url.authority());
Expand Down

0 comments on commit 24579e2

Please sign in to comment.