mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
set lang, only set screen res if full screen
This commit is contained in:
parent
99bf460bf1
commit
10318e0984
2 changed files with 11 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.emby"
|
||||
name="Emby"
|
||||
version="2.2.48"
|
||||
version="2.2.49"
|
||||
provider-name="Emby.media">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.19.0"/>
|
||||
|
|
|
@ -34,8 +34,11 @@ class GoogleAnalytics():
|
|||
self.user_name = md5.new(self.user_name).hexdigest()
|
||||
|
||||
# resolution
|
||||
self.height = xbmcgui.Window(10000).getHeight()
|
||||
self.width = xbmcgui.Window(10000).getWidth()
|
||||
self.screen_mode = xbmc.getInfoLabel("System.ScreenMode")
|
||||
self.screen_height = xbmc.getInfoLabel("System.ScreenHeight")
|
||||
self.screen_width = xbmc.getInfoLabel("System.ScreenWidth")
|
||||
|
||||
self.lang = xbmc.getInfoLabel("System.Language")
|
||||
|
||||
def getUserAgentOS(self):
|
||||
|
||||
|
@ -101,8 +104,11 @@ class GoogleAnalytics():
|
|||
data['ec'] = eventCategory # Event Category
|
||||
data['ea'] = eventAction # Event Action
|
||||
|
||||
# add width and height
|
||||
data['sr'] = str(self.width) + "x" + str(self.height)
|
||||
# add width and height, only add if full screen
|
||||
if(self.screen_mode.lower().find("window") == -1):
|
||||
data['sr'] = str(self.screen_width) + "x" + str(self.screen_height)
|
||||
|
||||
data["ul"] = self.lang
|
||||
|
||||
if(eventLabel != None):
|
||||
data['el'] = eventLabel # Event Label
|
||||
|
|
Loading…
Reference in a new issue