From 54b424d28cbc56fd958c915170a0e4efd8b1eb39 Mon Sep 17 00:00:00 2001 From: stephendenham Date: Thu, 28 Nov 2013 17:34:47 +0000 Subject: [PATCH] Replace md5 with hashlib. git-svn-id: svn://svn.code.sf.net/p/xbmc-groove/code@90 2dec19e3-eb1d-4749-8193-008c8bba0994 --- addon.xml | 4 ++-- changelog.txt | 4 ++++ resources/lib/GroovesharkAPI.py | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/addon.xml b/addon.xml index 20e7987..449aa00 100644 --- a/addon.xml +++ b/addon.xml @@ -1,6 +1,6 @@  + version="2.0.6" provider-name="Stephen Denham"> @@ -13,7 +13,7 @@ all Grooveshark addon for XBMC. - Grooveshark addon for XBMC. You should enter your Grooveshark Anywhere username and password in the addon settings. + Grooveshark addon for XBMC. You must enter your Grooveshark Anywhere username and password in the addon settings. GNU GENERAL PUBLIC LICENSE. Version 2, June 1991 stephen dot denham at gmail dot com diff --git a/changelog.txt b/changelog.txt index 194bb0c..06998f6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +2.0.6 + +Replace md5 with hashlib. + 2.0.5 Fix add to playlist. diff --git a/resources/lib/GroovesharkAPI.py b/resources/lib/GroovesharkAPI.py index 9b8feda..fd09c16 100644 --- a/resources/lib/GroovesharkAPI.py +++ b/resources/lib/GroovesharkAPI.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with xbmc-groove. If not, see . -import urllib2, pprint, md5, os, pickle, tempfile, time, re, simplejson, base64, sys, socket +import urllib2, pprint, os, pickle, tempfile, time, re, simplejson, base64, sys, socket, hashlib from blowfish import Blowfish SESSION_EXPIRY = 1209600 # 2 weeks @@ -38,7 +38,7 @@ class GrooveAPI: _sessionID = '' _userID = 0 _lastSessionTime = 0 - _key = md5.new(os.path.basename("GroovesharkAPI.py")).hexdigest() + _key = hashlib.md5(os.path.basename("GroovesharkAPI.py")).hexdigest() _debugging = False # Constructor @@ -188,7 +188,7 @@ class GrooveAPI: # Authenticates the user for current API session def _authenticate(self, login, password): - md5pwd = md5.new(password).hexdigest() + md5pwd = hashlib.md5(password).hexdigest() params = {'login': login, 'password': md5pwd} result = self._callRemote('authenticate', params) -- 2.20.1