Fix sessions bug.
authorstephendenham <stephendenham@2dec19e3-eb1d-4749-8193-008c8bba0994>
Mon, 12 May 2014 17:34:09 +0000 (17:34 +0000)
committerstephendenham <stephendenham@2dec19e3-eb1d-4749-8193-008c8bba0994>
Mon, 12 May 2014 17:34:09 +0000 (17:34 +0000)
git-svn-id: svn://svn.code.sf.net/p/xbmc-groove/code@98 2dec19e3-eb1d-4749-8193-008c8bba0994

addon.xml
changelog.txt
resources/lib/GroovesharkAPI.py

index 8a0c758..40502e8 100644 (file)
--- a/addon.xml
+++ b/addon.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.audio.groove" name="Grooveshark XBMC"
-       version="2.0.9" provider-name="Stephen Denham">
+       version="2.0.10" provider-name="Stephen Denham">
        <requires>
                <import addon="xbmc.python" version="2.1.0" />
                <import addon="script.module.simplejson"/>
index e521ff5..5dcfffe 100644 (file)
@@ -1,3 +1,7 @@
+2.10.0
+
+Fix sessions bug.
+
 2.0.9
 
 Fix for Android temp directory.
index c34d3ea..91add08 100644 (file)
 #    You should have received a copy of the GNU General Public License
 #    along with xbmc-groove.  If not, see <http://www.gnu.org/licenses/>.
 
-import urllib2, pprint, os, pickle, tempfile, time, re, simplejson, base64, sys, socket, hashlib, getpass
+import urllib2, pprint, os, pickle, time, re, simplejson, base64, sys, socket, hashlib
 from blowfish import Blowfish
 
-SESSION_EXPIRY = 1209600 # 2 weeks
+SESSION_EXPIRY = 120 #1209600 # 2 weeks
 
 # Web app
 WEB_APP_URL = "http://xbmc-groove.appspot.com/"
@@ -66,6 +66,7 @@ class GrooveAPI:
                                self._ip = self._getIP()
                                self._country = self._getCountry()
                                self._setSavedSession()
+                               self.logout()
 
        # Call to API
        def _callRemote(self, method, params):
@@ -228,7 +229,7 @@ class GrooveAPI:
                        self._setSavedSession()
                        return True
                return False
-
+       
        # Gets a stream key and host to get song content
        def getSubscriberStreamKey(self, songID):
                params = { "songID": songID, "country": self._country }