mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
add Kodi version to user agent string
This commit is contained in:
parent
10318e0984
commit
896fba3bbd
1 changed files with 10 additions and 2 deletions
|
@ -24,7 +24,15 @@ class GoogleAnalytics():
|
||||||
client_info = clientinfo.ClientInfo()
|
client_info = clientinfo.ClientInfo()
|
||||||
self.version = client_info.get_version()
|
self.version = client_info.get_version()
|
||||||
self.device_id = client_info.get_device_id()
|
self.device_id = client_info.get_device_id()
|
||||||
self.userAgent = "Kodi (" + self.getUserAgentOS() + ")"
|
|
||||||
|
# user agent string, used for OS and Kodi version identification
|
||||||
|
kodi_ver = xbmc.getInfoLabel("System.BuildVersion")
|
||||||
|
if(not kodi_ver):
|
||||||
|
kodi_ver = "na"
|
||||||
|
kodi_ver = kodi_ver.strip()
|
||||||
|
if(kodi_ver.find(" ") > 0):
|
||||||
|
kodi_ver = kodi_ver[0:kodi_ver.find(" ")]
|
||||||
|
self.userAgent = "Kodi/" + kodi_ver + " (" + self.getUserAgentOS() + ")"
|
||||||
|
|
||||||
# Use set user name
|
# Use set user name
|
||||||
self.user_name = settings('username') or settings('connectUsername') or 'None'
|
self.user_name = settings('username') or settings('connectUsername') or 'None'
|
||||||
|
|
Loading…
Reference in a new issue