From: stephendenham Date: Sun, 2 Oct 2011 13:46:30 +0000 (+0000) Subject: Retry URL. X-Git-Url: https://git.hcoop.net/clinton/xbmc-groove.git/commitdiff_plain/c8c5206a22a70f751269b27d5e50c7b350bd216e Retry URL. git-svn-id: svn://svn.code.sf.net/p/xbmc-groove/code@60 2dec19e3-eb1d-4749-8193-008c8bba0994 --- diff --git a/default.py b/default.py index 8ebbdd4..50c904b 100644 --- a/default.py +++ b/default.py @@ -63,6 +63,8 @@ NAME_ALBUM_ARTIST_LABEL = 1 # Stream marking time (seconds) STREAM_MARKING_TIME = 30 +# Retry URL +STREAM_RETRY = 10 songMarkTime = 0 player = xbmc.Player() @@ -498,6 +500,11 @@ class Grooveshark: except: pass time.sleep(1) seconds = seconds + 1 + if (seconds == STREAM_RETRY): + stream = groovesharkApi.getSubscriberStreamKey(songid) + url = stream['url'] + item.setPath(url) + xbmcplugin.setResolvedUrl(handle=int(sys.argv[1]), succeeded=True, listitem=item) else: xbmc.executebuiltin('XBMC.Notification(' + __language__(30008) + ', ' + __language__(30044) + ', 1000, ' + thumbDef + ')')