Attempt to fix MAL updater crashing syncplay gui
This commit is contained in:
parent
75456c8f31
commit
9479bd4ffa
@ -466,17 +466,20 @@ class MalUpdater(object):
|
|||||||
self._lastHookUpdate = None
|
self._lastHookUpdate = None
|
||||||
|
|
||||||
def _updateMal(self):
|
def _updateMal(self):
|
||||||
self._fileDuration = 0 # Disable playingHook
|
try:
|
||||||
if(libMal and self._filename and self.__username and self.__password):
|
self._fileDuration = 0 # Disable playingHook
|
||||||
manager = libMal.Manager(self.__username, self.__password)
|
if(libMal and self._filename and self.__username and self.__password):
|
||||||
results = manager.findEntriesOnMal(self._filename)
|
manager = libMal.Manager(self.__username, self.__password)
|
||||||
if(len(results) > 0):
|
results = manager.findEntriesOnMal(self._filename)
|
||||||
result = results[0]
|
if(len(results) > 0):
|
||||||
message = "Updating MAL with: \"{}\", episode: {}".format(result.mainTitle, result.episodeBeingWatched)
|
result = results[0]
|
||||||
self._ui.showMessage(message)
|
message = "Updating MAL with: \"{}\", episode: {}".format(result.mainTitle, result.episodeBeingWatched)
|
||||||
options = {"tags": ["syncplay"]}
|
reactor.callFromThread(self._ui.showMessage,(message),)
|
||||||
manager.updateEntryOnMal(result, options)
|
options = {"tags": ["syncplay"]}
|
||||||
self._filename = "" # Make sure no updates will be performed until switch
|
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):
|
class SyncplayUserlist(object):
|
||||||
def __init__(self, ui, client):
|
def __init__(self, ui, client):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user