mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
fix windoes videos again
This commit is contained in:
@@ -87,11 +87,10 @@ def create_caml(video_path: str, output_file: str, auto_reverses: bool, update_l
|
|||||||
name = 'assets/' + str(currentframe) + '.jpg'
|
name = 'assets/' + str(currentframe) + '.jpg'
|
||||||
if update_label:
|
if update_label:
|
||||||
update_label('Creating...' + name)
|
update_label('Creating...' + name)
|
||||||
else:
|
|
||||||
print('Creating...' + name)
|
print('Creating...' + name)
|
||||||
|
|
||||||
# writing the extracted images
|
# writing the extracted images
|
||||||
cv2.imwrite(os.path.join(output_file, name), frame)
|
cv2.imwrite(os.path.join(output_file.removeprefix(u"\\\\?\\"), name), frame)
|
||||||
caml.write(f"\t\t\t<CGImage src=\"{name}\"/>\n")
|
caml.write(f"\t\t\t<CGImage src=\"{name}\"/>\n")
|
||||||
|
|
||||||
# increasing counter so that it will
|
# increasing counter so that it will
|
||||||
|
|||||||
@@ -211,9 +211,9 @@ class PosterboardTweak(Tweak):
|
|||||||
print(f"file: {self.videoFile}, looping: {self.loop_video}")
|
print(f"file: {self.videoFile}, looping: {self.loop_video}")
|
||||||
if self.videoFile and self.loop_video:
|
if self.videoFile and self.loop_video:
|
||||||
source_dir = get_bundle_files("files/posterboard/VideoCAML")
|
source_dir = get_bundle_files("files/posterboard/VideoCAML")
|
||||||
video_output_dir = os.path.join(output_dir, "descriptor/VideoCAML")
|
video_output_dir = os.path.join(output_dir, "descriptor", "VideoCAML")
|
||||||
copytree(source_dir, video_output_dir, dirs_exist_ok=True)
|
copytree(source_dir, video_output_dir, dirs_exist_ok=True)
|
||||||
contents_path = os.path.join(video_output_dir, "versions/1/contents/9183.Custom-810w-1080h@2x~ipad.wallpaper")
|
contents_path = os.path.join(video_output_dir, "versions", "1", "contents", "9183.Custom-810w-1080h@2x~ipad.wallpaper")
|
||||||
if self.use_foreground:
|
if self.use_foreground:
|
||||||
# rename the foreground layer to background
|
# rename the foreground layer to background
|
||||||
bg_path = os.path.join(contents_path, "9183.Custom_Background-810w-1080h@2x~ipad.ca")
|
bg_path = os.path.join(contents_path, "9183.Custom_Background-810w-1080h@2x~ipad.ca")
|
||||||
|
|||||||
Reference in New Issue
Block a user