forked from LBRYCommunity/lbry-sdk
Merge remote-tracking branch 'origin/linux_analytics'
This commit is contained in:
commit
4b766eeea9
4 changed files with 11 additions and 1 deletions
|
@ -59,6 +59,7 @@ at anytime.
|
|||
* integration tests for bootstrapping the dht
|
||||
* configurable `concurrent_announcers` and `s3_headers_depth` settings
|
||||
* `peer_ping` command
|
||||
* linux distro and desktop name added to analytics
|
||||
|
||||
### Removed
|
||||
* `announce_all` argument from `blob_announce`
|
||||
|
|
|
@ -185,7 +185,7 @@ class Manager(object):
|
|||
|
||||
@staticmethod
|
||||
def _make_context(platform, wallet):
|
||||
return {
|
||||
context = {
|
||||
'app': {
|
||||
'name': 'lbrynet',
|
||||
'version': platform['lbrynet_version'],
|
||||
|
@ -206,6 +206,10 @@ class Manager(object):
|
|||
'version': '1.0.0'
|
||||
},
|
||||
}
|
||||
if 'desktop' in platform and 'distro' in platform:
|
||||
context['os']['desktop'] = platform['desktop']
|
||||
context['os']['distro'] = platform['distro']
|
||||
return context
|
||||
|
||||
@staticmethod
|
||||
def _if_deferred(maybe_deferred, callback, *args, **kwargs):
|
||||
|
|
|
@ -36,6 +36,10 @@ def get_platform(get_ip=True):
|
|||
"lbryschema_version": lbryschema_version,
|
||||
"build": build_type.BUILD, # CI server sets this during build step
|
||||
}
|
||||
if p["os_system"] == "Linux":
|
||||
import distro
|
||||
p["distro"] = distro.info()
|
||||
p["desktop"] = os.environ.get('XDG_CURRENT_DESKTOP', 'Unknown')
|
||||
|
||||
# TODO: remove this from get_platform and add a get_external_ip function using treq
|
||||
if get_ip:
|
||||
|
|
1
setup.py
1
setup.py
|
@ -17,6 +17,7 @@ from setuptools import setup, find_packages
|
|||
requires = [
|
||||
'Twisted',
|
||||
'appdirs',
|
||||
'distro',
|
||||
'base58',
|
||||
'envparse',
|
||||
'jsonrpc',
|
||||
|
|
Loading…
Reference in a new issue