Example #1
0
def execute_library_tasks(videoid, task_handler, title, sync_mylist=True):
    """Execute library tasks for videoid and show errors in foreground"""
    common.execute_tasks(title=title,
                         tasks=compile_tasks(videoid),
                         task_handler=task_handler,
                         notify_errors=True,
                         library_home=library_path())
    _sync_mylist(videoid, task_handler, sync_mylist)
Example #2
0
def execute_library_tasks(videoid,
                          task_handlers,
                          title,
                          sync_mylist=True,
                          nfo_settings=None):
    """Execute library tasks for videoid and show errors in foreground"""
    for task_handler in task_handlers:
        common.execute_tasks(title=title,
                             tasks=compile_tasks(videoid, task_handler,
                                                 nfo_settings),
                             task_handler=task_handler,
                             notify_errors=True,
                             library_home=library_path())

        # Exclude update operations
        if task_handlers != [remove_item, export_item]:
            _sync_mylist(videoid, task_handler, sync_mylist)