Fix desktop to support this
This commit is contained in:
parent
d90c4dabe7
commit
fef068d809
6 changed files with 27 additions and 29 deletions
|
|
@ -135,9 +135,6 @@ pub struct RqbitDesktopConfigUpnp {
|
|||
#[serde(default)]
|
||||
pub enable_server: bool,
|
||||
|
||||
#[serde(default)]
|
||||
pub server_hostname: Option<String>,
|
||||
|
||||
#[serde(default)]
|
||||
pub server_friendly_name: Option<String>,
|
||||
}
|
||||
|
|
@ -183,12 +180,6 @@ impl RqbitDesktopConfig {
|
|||
if self.http_api.listen_addr.ip().is_loopback() {
|
||||
anyhow::bail!("if UPnP server is enabled, you need to set HTTP API IP to 0.0.0.0 or at least non-localhost address.")
|
||||
}
|
||||
match self.upnp.server_hostname.as_ref().map(|s| s.trim()) {
|
||||
Some("") | None => {
|
||||
anyhow::bail!("UPnP hostname must be set to non-empty string")
|
||||
}
|
||||
Some(_) => {}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue