forked from LBRYCommunity/lbry-sdk
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 twisted.internet import defer, threads, reactor, error, task
|
||||
import lbryschema
|
||||
from aioupnp import __version__ as aioupnp_version
|
||||
from aioupnp.upnp import UPnP
|
||||
from aioupnp.fault import UPnPError
|
||||
from lbrynet import conf
|
||||
|
@ -792,8 +793,9 @@ class UPnPComponent(Component):
|
|||
|
||||
def get_status(self):
|
||||
return {
|
||||
'aioupnp_version': aioupnp_version,
|
||||
'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,
|
||||
'peer_redirect_set': 'TCP' in self.upnp_redirects,
|
||||
'external_ip': self.external_ip
|
||||
|
|
|
@ -773,6 +773,7 @@ class Daemon(AuthJSONRPCServer):
|
|||
'managed_files': (int) count of files in the file manager,
|
||||
},
|
||||
'upnp': {
|
||||
'aioupnp_version': (str),
|
||||
'redirects': {
|
||||
<TCP | UDP>: (int) external_port,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue