def get_album_json_thread(self):
try:
while not xbmc.abortRequested and not self.abortAlbumThreads:
try:
album_id = self.albumQueue.get_nowait()
except:
break
try:
self.get_album(album_id, withCache=False)
except requests.HTTPError as e:
r = e.response
msg = _T(30505)
try:
msg = r.reason
msg = r.json().get('userMessage')
except:
pass
log('Error getting Album ID %s' % album_id, xbmc.LOGERROR)
if r.status_code == 429 and not self.abortAlbumThreads:
self.abortAlbumThreads = True
log('Too many requests. Aborting Workers ...', xbmc.LOGERROR)
self.albumQueue._init(9999)
xbmcgui.Dialog().notification(plugin.name, msg, xbmcgui.NOTIFICATION_ERROR)
except Exception, e:
traceback.print_exc()
评论列表
文章目录