<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.groove" name="Grooveshark XBMC"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.groove" name="Grooveshark XBMC"
- version="2.0.10" provider-name="Stephen Denham">
+ version="2.0.11" provider-name="Stephen Denham">
<requires>
<import addon="xbmc.python" version="2.1.0" />
<import addon="script.module.simplejson"/>
<requires>
<import addon="xbmc.python" version="2.1.0" />
<import addon="script.module.simplejson"/>
+2.11.0
+
+Fix artwork download.
+
# along with xbmc-groove. If not, see <http://www.gnu.org/licenses/>.
# along with xbmc-groove. If not, see <http://www.gnu.org/licenses/>.
-import urllib, sys, os, shutil, re, pickle, time, traceback, xbmcaddon, xbmcplugin, xbmcgui, xbmc
+import urllib, urllib2, sys, os, shutil, re, pickle, time, traceback, xbmcaddon, xbmcplugin, xbmcgui, xbmc
__addon__ = xbmcaddon.Addon('plugin.audio.groove')
__addonname__ = __addon__.getAddonInfo('name')
__addon__ = xbmcaddon.Addon('plugin.audio.groove')
__addonname__ = __addon__.getAddonInfo('name')
localThumb = os.path.join(xbmc.translatePath(os.path.join(thumbDir, str(songid)))) + '.tbn'
try:
if os.path.isfile(localThumb) == False:
localThumb = os.path.join(xbmc.translatePath(os.path.join(thumbDir, str(songid)))) + '.tbn'
try:
if os.path.isfile(localThumb) == False:
- loc = urllib.URLopener()
- loc.retrieve(url, localThumb)
+ headers = { 'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/32.0.1700.102 Chrome/32.0.1700.102 Safari/537.36' }
+ req = urllib2.Request(url, None, headers)
+ loc = urllib2.urlopen(req)
+ output = open(localThumb,'wb')
+ output.write(loc.read())
+ output.close()
except:
shutil.copy2(thumbDef, localThumb)
return os.path.join(os.path.join(thumbDir, str(songid))) + '.tbn'
except:
shutil.copy2(thumbDef, localThumb)
return os.path.join(os.path.join(thumbDir, str(songid))) + '.tbn'