Fix AttributeError: 'super' object has no attribute

This commit is contained in:
croneter 2018-10-24 18:08:00 +02:00
parent a9138cbd71
commit 3558182b7e
3 changed files with 4 additions and 3 deletions

View file

@ -8,9 +8,8 @@ from .. import state
class libsync_mixin(object):
def isCanceled(self):
return (super(libsync_mixin, self).isCanceled() or
state.SUSPEND_LIBRARY_THREAD or
state.SUSPEND_SYNC)
return (self._canceled or xbmc.abortRequested or
state.SUSPEND_LIBRARY_THREAD or state.SUSPEND_SYNC)
def update_kodi_library(video=True, music=True):

View file

@ -27,6 +27,7 @@ class FullSync(backgroundthread.KillableThread, common.libsync_mixin):
"""
repair=True: force sync EVERY item
"""
self._canceled = False
self.repair = repair
self.callback = callback
self.show_dialog = show_dialog

View file

@ -38,6 +38,7 @@ class ProcessMetadata(backgroundthread.KillableThread, common.libsync_mixin):
itemtypes.Movies()
"""
def __init__(self, queue, last_sync, show_dialog):
self._canceled = False
self.queue = queue
self.last_sync = last_sync
self.show_dialog = show_dialog