# 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
self._ip = self._getIP()
self._country = self._getCountry()
self._setSavedSession()
+ self.logout()
# Call to API
def _callRemote(self, method, params):
return ''
def _getSavedSession(self):
- path = os.path.join(self.cacheDir, 'session.dmp')
+ path = os.path.join(self.cacheDir, 'groovesharksession.dmp')
try:
f = open(path, 'rb')
session = pickle.load(f)
# Create the directory if it doesn't exist.
if not os.path.exists(self.cacheDir):
os.makedirs(self.cacheDir)
- path = os.path.join(self.cacheDir, 'session.dmp')
+ path = os.path.join(self.cacheDir, 'groovesharksession.dmp')
f = open(path, 'wb')
session = { 'sessionID' : self._sessionID, 'lastSessionTime' : self._lastSessionTime, 'userID': self._userID, 'ip' : self._ip, 'country' : self._country }
pickle.dump(session, f, protocol=pickle.HIGHEST_PROTOCOL)
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 }