From fb77ab44eea554ac837a080a2f81097130f812cc Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 7 Apr 2023 19:51:40 +0700 Subject: [PATCH] fix manual import media file permission, add missing comment check trigger --- tubearchivist/home/src/index/manual.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tubearchivist/home/src/index/manual.py b/tubearchivist/home/src/index/manual.py index 89969f81..66b6bca2 100644 --- a/tubearchivist/home/src/index/manual.py +++ b/tubearchivist/home/src/index/manual.py @@ -12,6 +12,7 @@ import shutil import subprocess from home.src.download.thumbnails import ThumbManager +from home.src.index.comments import CommentList from home.src.index.video import YoutubeVideo from home.src.ta.config import AppConfig from home.src.ta.helper import ignore_filelist @@ -141,6 +142,9 @@ class ImportFolderScanner: ManualImport(current_video, self.CONFIG).run() + video_ids = [i["video_id"] for i in self.to_import] + CommentList(video_ids, task=self.task).index() + def _notify(self, idx, current_video): """send notification back to task""" filename = os.path.split(current_video["media"])[-1] @@ -441,6 +445,8 @@ class ManualImport: old_path = self.current_video["media"] new_path = os.path.join(channel_folder, file) shutil.move(old_path, new_path, copy_function=shutil.copyfile) + if host_uid and host_gid: + os.chown(new_path, host_uid, host_gid) base_name, _ = os.path.splitext(new_path) for old_path in self.current_video["subtitle"]: