2021-08-24 15:39:13 -04:00
|
|
|
# Copyright 2021 (c) Anna Schumaker.
|
|
|
|
from . import metadata
|
2021-08-25 15:51:14 -04:00
|
|
|
from . import queue
|
2021-08-25 10:41:39 -04:00
|
|
|
from . import task
|
2021-08-26 12:27:25 -04:00
|
|
|
from . import widgets
|
2021-08-30 10:57:05 -04:00
|
|
|
|
|
|
|
Queue = queue.TaskQueue()
|
|
|
|
|
2021-08-30 11:12:47 -04:00
|
|
|
|
|
|
|
def ProgressBar():
|
|
|
|
return widgets.ProgressBar(Queue)
|
|
|
|
|
|
|
|
def AddFolderButton():
|
|
|
|
return widgets.AddFolderButton(Queue)
|
|
|
|
|
|
|
|
def UpdateButton(library):
|
|
|
|
return widgets.UpdateButton(library, Queue)
|
|
|
|
|
|
|
|
def UpdateAllButton():
|
|
|
|
return widgets.UpdateAllButton(Queue)
|
|
|
|
|
|
|
|
def RemoveButton(library):
|
|
|
|
return widgets.RemoveButton(library, Queue)
|
|
|
|
|
2021-11-05 15:50:04 -04:00
|
|
|
def EnableSwitch(library):
|
|
|
|
return widgets.EnableSwitch(library, Queue)
|
|
|
|
|
2021-08-30 11:12:47 -04:00
|
|
|
|
2021-11-05 14:03:58 -04:00
|
|
|
def commit():
|
|
|
|
Queue.push(task.CommitTask())
|
|
|
|
|
2021-08-30 10:57:05 -04:00
|
|
|
def update_library(lib):
|
|
|
|
Queue.push(task.CheckSchedulerTask(lib))
|
2021-12-27 16:52:20 -05:00
|
|
|
Queue.push(task.DirectoryTask(lib, lib.path))
|
2021-08-30 10:57:05 -04:00
|
|
|
|
|
|
|
def remove_library(lib):
|
|
|
|
Queue.push(task.RemoveLibrarySchedulerTask(lib))
|