mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:39:38 +00:00
delay config import for better startup
This commit is contained in:
@@ -28,7 +28,6 @@ class ImportFolderScanner:
|
|||||||
- convert if needed
|
- convert if needed
|
||||||
"""
|
"""
|
||||||
|
|
||||||
CONFIG = AppConfig().config
|
|
||||||
CACHE_DIR = EnvironmentSettings.CACHE_DIR
|
CACHE_DIR = EnvironmentSettings.CACHE_DIR
|
||||||
IMPORT_DIR = os.path.join(CACHE_DIR, "import")
|
IMPORT_DIR = os.path.join(CACHE_DIR, "import")
|
||||||
|
|
||||||
@@ -129,6 +128,7 @@ class ImportFolderScanner:
|
|||||||
|
|
||||||
def process_videos(self):
|
def process_videos(self):
|
||||||
"""loop through all videos"""
|
"""loop through all videos"""
|
||||||
|
config = AppConfig().config
|
||||||
for idx, current_video in enumerate(self.to_import):
|
for idx, current_video in enumerate(self.to_import):
|
||||||
if not current_video["media"]:
|
if not current_video["media"]:
|
||||||
print(f"{current_video}: no matching media file found.")
|
print(f"{current_video}: no matching media file found.")
|
||||||
@@ -144,7 +144,7 @@ class ImportFolderScanner:
|
|||||||
self._convert_video(current_video)
|
self._convert_video(current_video)
|
||||||
print(f"manual import: {current_video}")
|
print(f"manual import: {current_video}")
|
||||||
|
|
||||||
ManualImport(current_video, self.CONFIG).run()
|
ManualImport(current_video, config).run()
|
||||||
|
|
||||||
video_ids = [i["video_id"] for i in self.to_import]
|
video_ids = [i["video_id"] for i in self.to_import]
|
||||||
comment_list = CommentList(task=self.task)
|
comment_list = CommentList(task=self.task)
|
||||||
|
|||||||
Reference in New Issue
Block a user