Make it possible to switch progress bar

This commit is contained in:
taizan-hokuto
2020-09-07 23:29:48 +09:00
parent 157f3b9952
commit 08b86fe596
4 changed files with 129 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ class Arguments(metaclass=Singleton):
OUTPUT: str = 'output_dir'
VIDEO_IDS: str = 'video_id'
SAVE_ERROR_DATA: bool = 'save_error_data'
PBAR: bool ='pbar'
def __init__(self,
arguments: Optional[Dict[str, Union[str, bool, int]]] = None):
@@ -36,6 +37,7 @@ class Arguments(metaclass=Singleton):
self.output: str = arguments[Arguments.Name.OUTPUT]
self.video_ids: List[int] = []
self.save_error_data: bool = arguments[Arguments.Name.SAVE_ERROR_DATA]
self.pbar: bool = arguments[Arguments.Name.PBAR]
# Videos
if arguments[Arguments.Name.VIDEO_IDS]:
self.video_ids = [video_id