mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
switch to use hashlib
This commit is contained in:
parent
e34734931d
commit
aa99b1a3c3
2 changed files with 5 additions and 5 deletions
|
@ -4,7 +4,7 @@ import traceback
|
||||||
import requests
|
import requests
|
||||||
import logging
|
import logging
|
||||||
import clientinfo
|
import clientinfo
|
||||||
import md5
|
import hashlib
|
||||||
import xbmc
|
import xbmc
|
||||||
import platform
|
import platform
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
|
@ -59,8 +59,8 @@ class GoogleAnalytics():
|
||||||
self.user_name = settings('username') or settings('connectUsername') or 'None'
|
self.user_name = settings('username') or settings('connectUsername') or 'None'
|
||||||
|
|
||||||
# use md5 for client and user for analytics
|
# use md5 for client and user for analytics
|
||||||
self.device_id = md5.new(self.device_id).hexdigest()
|
self.device_id = hashlib.md5(self.device_id).hexdigest()
|
||||||
self.user_name = md5.new(self.user_name).hexdigest()
|
self.user_name = hashlib.md5(self.user_name).hexdigest()
|
||||||
|
|
||||||
# resolution
|
# resolution
|
||||||
self.screen_mode = xbmc.getInfoLabel("System.ScreenMode")
|
self.screen_mode = xbmc.getInfoLabel("System.ScreenMode")
|
||||||
|
|
|
@ -20,7 +20,7 @@ import videonodes
|
||||||
import websocket_client as wsc
|
import websocket_client as wsc
|
||||||
from utils import window, settings, dialog, language as lang
|
from utils import window, settings, dialog, language as lang
|
||||||
from ga_client import GoogleAnalytics
|
from ga_client import GoogleAnalytics
|
||||||
import md5
|
import hashlib
|
||||||
|
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ class Service(object):
|
||||||
|
|
||||||
serverId = settings('serverId')
|
serverId = settings('serverId')
|
||||||
if(serverId != None):
|
if(serverId != None):
|
||||||
serverId = md5.new(serverId).hexdigest()
|
serverId = hashlib.md5(serverId).hexdigest()
|
||||||
|
|
||||||
ga = GoogleAnalytics()
|
ga = GoogleAnalytics()
|
||||||
ga.sendEventData("Application", "Startup", serverId)
|
ga.sendEventData("Application", "Startup", serverId)
|
||||||
|
|
Loading…
Reference in a new issue