Skip to content

Commit

Permalink
Merge pull request #238 from ikatson/ssdp-ipv6
Browse files Browse the repository at this point in the history
[Feature] SSDP IPv6 support
  • Loading branch information
ikatson authored Sep 20, 2024
2 parents 932131b + 189dea3 commit d9a56ac
Show file tree
Hide file tree
Showing 5 changed files with 344 additions and 163 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ webui-dev: webui-deps
# NOTE: on LG TV using hostname is unstable for some reason, use IP address.
export RQBIT_UPNP_SERVER_ENABLE ?= true
export RQBIT_UPNP_SERVER_FRIENDLY_NAME ?= rqbit-dev
export RQBIT_HTTP_API_LISTEN_ADDR ?= 0.0.0.0:3030
export RQBIT_HTTP_API_LISTEN_ADDR ?= [::]:3030
export RQBIT_FASTRESUME = true
CARGO_RUN_FLAGS ?=
RQBIT_OUTPUT_FOLDER ?= /tmp/scratch
Expand Down
14 changes: 5 additions & 9 deletions crates/librqbit/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1198,17 +1198,13 @@ impl Session {
peer_rx,
);

{
let span = managed_torrent.shared.span.clone();
let _ = span.enter();

managed_torrent
.start(peer_rx, opts.paused)
.context("error starting torrent")?;
}
let _e = managed_torrent.shared.span.clone().entered();
managed_torrent
.start(peer_rx, opts.paused)
.context("error starting torrent")?;

if let Some(name) = managed_torrent.shared().info.name.as_ref() {
info!(?name, id, "added torrent");
info!(?name, "added torrent");
}

Ok(AddTorrentResponse::Added(id, managed_torrent))
Expand Down
4 changes: 2 additions & 2 deletions crates/upnp-serve/src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub const UPNP_KIND_ROOT_DEVICE: &str = "upnp:rootdevice";
pub const UPNP_KIND_MEDIASERVER: &str = "urn:schemas-upnp-org:device:MediaServer:1";
pub const UPNP_DEVICE_ROOT: &str = "upnp:rootdevice";
pub const UPNP_DEVICE_MEDIASERVER: &str = "urn:schemas-upnp-org:device:MediaServer:1";

pub const SOAP_ACTION_CONTENT_DIRECTORY_BROWSE: &[u8] =
b"\"urn:schemas-upnp-org:service:ContentDirectory:1#Browse\"";
Expand Down
Loading

0 comments on commit d9a56ac

Please sign in to comment.