add aioupnp version to upnp status
-set non-blank not found message if upnp fails
This commit is contained in:
parent
5f2f06c269
commit
d9b1be6214
2 changed files with 4 additions and 1 deletions
|
@ -8,6 +8,7 @@ from hashlib import sha256
|
||||||
from types import SimpleNamespace
|
from types import SimpleNamespace
|
||||||
from twisted.internet import defer, threads, reactor, error, task
|
from twisted.internet import defer, threads, reactor, error, task
|
||||||
import lbryschema
|
import lbryschema
|
||||||
|
from aioupnp import __version__ as aioupnp_version
|
||||||
from aioupnp.upnp import UPnP
|
from aioupnp.upnp import UPnP
|
||||||
from aioupnp.fault import UPnPError
|
from aioupnp.fault import UPnPError
|
||||||
from lbrynet import conf
|
from lbrynet import conf
|
||||||
|
@ -792,8 +793,9 @@ class UPnPComponent(Component):
|
||||||
|
|
||||||
def get_status(self):
|
def get_status(self):
|
||||||
return {
|
return {
|
||||||
|
'aioupnp_version': aioupnp_version,
|
||||||
'redirects': self.upnp_redirects,
|
'redirects': self.upnp_redirects,
|
||||||
'gateway': '' if not self.upnp else self.upnp.gateway.manufacturer_string,
|
'gateway': 'No gateway found' if not self.upnp else self.upnp.gateway.manufacturer_string,
|
||||||
'dht_redirect_set': 'UDP' in self.upnp_redirects,
|
'dht_redirect_set': 'UDP' in self.upnp_redirects,
|
||||||
'peer_redirect_set': 'TCP' in self.upnp_redirects,
|
'peer_redirect_set': 'TCP' in self.upnp_redirects,
|
||||||
'external_ip': self.external_ip
|
'external_ip': self.external_ip
|
||||||
|
|
|
@ -773,6 +773,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
'managed_files': (int) count of files in the file manager,
|
'managed_files': (int) count of files in the file manager,
|
||||||
},
|
},
|
||||||
'upnp': {
|
'upnp': {
|
||||||
|
'aioupnp_version': (str),
|
||||||
'redirects': {
|
'redirects': {
|
||||||
<TCP | UDP>: (int) external_port,
|
<TCP | UDP>: (int) external_port,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue