mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +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
|
@ -23,8 +23,16 @@ class GoogleAnalytics():
|
|||
|
||||
client_info = clientinfo.ClientInfo()
|
||||
self.version = client_info.get_version()
|
||||
self.device_id = client_info.get_device_id()
|
||||
self.userAgent = "Kodi (" + self.getUserAgentOS() + ")"
|
||||
self.device_id = client_info.get_device_id()
|
||||
|
||||
# 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
|
||||
self.user_name = settings('username') or settings('connectUsername') or 'None'
|
||||
|
|
Loading…
Reference in a new issue