Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] SSDP IPv6 support #238

Merged
merged 11 commits into from
Sep 20, 2024
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