Attempt to fix MAL updater crashing syncplay gui

This commit is contained in:
Uriziel 2013-06-11 19:51:03 +02:00
parent 75456c8f31
commit 9479bd4ffa

View File

@ -466,6 +466,7 @@ class MalUpdater(object):
self._lastHookUpdate = None
def _updateMal(self):
try:
self._fileDuration = 0 # Disable playingHook
if(libMal and self._filename and self.__username and self.__password):
manager = libMal.Manager(self.__username, self.__password)
@ -473,10 +474,12 @@ class MalUpdater(object):
if(len(results) > 0):
result = results[0]
message = "Updating MAL with: \"{}\", episode: {}".format(result.mainTitle, result.episodeBeingWatched)
self._ui.showMessage(message)
reactor.callFromThread(self._ui.showMessage,(message),)
options = {"tags": ["syncplay"]}
manager.updateEntryOnMal(result, options)
self._filename = "" # Make sure no updates will be performed until switch
except:
reactor.callFromThread(self._ui.showMessage, ("MAL Update failure"),)
class SyncplayUserlist(object):
def __init__(self, ui, client):