Fix for Android temp directory.
authorstephendenham <stephendenham@2dec19e3-eb1d-4749-8193-008c8bba0994>
Thu, 24 Apr 2014 16:58:33 +0000 (16:58 +0000)
committerstephendenham <stephendenham@2dec19e3-eb1d-4749-8193-008c8bba0994>
Thu, 24 Apr 2014 16:58:33 +0000 (16:58 +0000)
git-svn-id: svn://svn.code.sf.net/p/xbmc-groove/code@95 2dec19e3-eb1d-4749-8193-008c8bba0994

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

index 87e5b44..8a0c758 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.8" provider-name="Stephen Denham">
+       version="2.0.9" provider-name="Stephen Denham">
        <requires>
                <import addon="xbmc.python" version="2.1.0" />
                <import addon="script.module.simplejson"/>
index 8e7d8df..e521ff5 100644 (file)
@@ -1,3 +1,7 @@
+2.0.9
+
+Fix for Android temp directory.
+
 2.0.8
 
 Fix for multiuser environment.
index 8667bfc..a97b11e 100644 (file)
@@ -76,6 +76,7 @@ resDir = xbmc.translatePath(os.path.join(baseDir, 'resources'))
 libDir = xbmc.translatePath(os.path.join(resDir,  'lib'))
 imgDir = xbmc.translatePath(os.path.join(resDir,  'img'))
 cacheDir = os.path.join(xbmc.translatePath('special://masterprofile/addon_data/'), os.path.basename(baseDir))
+tempDir = xbmc.translatePath('special://temp')
 thumbDirName = 'thumb'
 thumbDir = os.path.join(xbmc.translatePath('special://masterprofile/addon_data/'), os.path.basename(baseDir), thumbDirName)
 
@@ -99,7 +100,7 @@ else:
     __debugging__ = False
 
 try:
-    groovesharkApi = GrooveAPI(__debugging__)
+    groovesharkApi = GrooveAPI(__debugging__, tempDir)
     if groovesharkApi.pingService() != True:
         raise StandardError(__language__(30007))
 except:
index 9376956..21e2bc1 100644 (file)
@@ -42,14 +42,14 @@ class GrooveAPI:
        _debugging = False
 
        # Constructor
-       def __init__(self, debug):
+       def __init__(self, debug, tempDir):
                
                self._debugging = debug
                self.simplejson = simplejson
                if "linux" in sys.platform.lower():
                        socket.setdefaulttimeout(30)
                        
-               self.cacheDir = os.path.join(tempfile.gettempdir(),getpass.getuser() + '_' + 'groovesharkapi')
+               self.cacheDir = tempDir
                if os.path.isdir(self.cacheDir) == False:
                        os.makedirs(self.cacheDir)
                        if self._debugging: