def _sync_mylist(videoid, task_handler, enabled): """Add or remove exported items to My List, if enabled in settings""" operation = { 'export_item': 'add', 'remove_item': 'remove'}.get(task_handler.__name__) if enabled and operation and g.ADDON.getSettingBool('mylist_library_sync'): common.debug('Syncing my list due to change of Kodi library') api.update_my_list(videoid, operation)
def my_list(self, videoid, pathitems): """Add or remove an item from my list""" operation = pathitems[1] api.update_my_list(videoid, operation) _sync_library(videoid, operation) common.refresh_container()