Skip to content

Commit adac2c1

Browse files
authored
Version 4.9.4 (#356)
* Fixing Apple videotoolbox were not being listed as options (thanks to sublimal) * Fixing concatenation of large amount of files could cause huge slowdowns to the app * Fixing thumbnails command did not work when ffmpeg was in a directory with a space in it's lineage (thanks to No Name)
1 parent 232a592 commit adac2c1

File tree

7 files changed

+760
-372
lines changed

7 files changed

+760
-372
lines changed

CHANGES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Version 4.9.4
4+
5+
* Fixing Apple videotoolbox were not being listed as options (thanks to sublimal)
6+
* Fixing concatenation of large amount of files could cause huge slowdowns to the app
7+
* Fixing thumbnails command did not work when ffmpeg was in a directory with a space in it's lineage (thanks to No Name)
8+
39
## Version 4.9.3
410

511
* Fixing #339 After cancelling queue button stay as cancel (thanks to wynterca)

fastflix/data/languages.yaml

Lines changed: 730 additions & 359 deletions
Large diffs are not rendered by default.

fastflix/encoders/h264_videotoolbox/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pkg_resources
77

88
name = "H264 (Video Toolbox)"
9-
requires = "h264_videotoolbox"
9+
requires = "videotoolbox"
1010
icon = str(Path(pkg_resources.resource_filename(__name__, f"../../data/encoders/icon_h264_toolbox.png")).resolve())
1111

1212

fastflix/encoders/hevc_videotoolbox/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pkg_resources
77

88
name = "HEVC (Video Toolbox)"
9-
requires = "hevc_videotoolbox"
9+
requires = "videotoolbox"
1010
icon = str(Path(pkg_resources.resource_filename(__name__, f"../../data/encoders/icon_hevc_toolbox.png")).resolve())
1111

1212

fastflix/flix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def generate_thumbnail_command(
318318
enable_opencl: bool = False,
319319
) -> str:
320320
command_options = [
321-
f"{config.ffmpeg}",
321+
f'"{config.ffmpeg}"',
322322
f"-ss {start_time}" if start_time else "",
323323
"-loglevel warning",
324324
f'-i "{clean_file_string(source)}"',

fastflix/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
__version__ = "4.9.3"
3+
__version__ = "4.9.4"
44
__author__ = "Chris Griffith"

fastflix/widgets/windows/concat.py

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pathlib import Path
33
import os
44
import logging
5+
import secrets
56

67
from PySide2 import QtWidgets, QtGui, QtCore
78

@@ -189,7 +190,8 @@ def check_to_add(file, list_of_items, bad_items, **_):
189190
items = []
190191
skipped = []
191192
tasks = []
192-
for file in Path(folder_name).glob("*"):
193+
file_list = sorted(Path(folder_name).glob("*"), key=lambda x: x.name)
194+
for file in file_list:
193195
if file.is_file():
194196
tasks.append(
195197
Task(
@@ -198,6 +200,9 @@ def check_to_add(file, list_of_items, bad_items, **_):
198200
kwargs={"file": file, "list_of_items": items, "bad_items": skipped},
199201
)
200202
)
203+
if len(tasks) > 100:
204+
error_message(t("There are more than 100 files, skipping pre-processing."))
205+
return self.save((x.name for x in file_list))
201206

202207
ProgressBar(self.app, tasks, can_cancel=True, auto_run=True)
203208

@@ -213,11 +218,16 @@ def check_to_add(file, list_of_items, bad_items, **_):
213218
)
214219
)
215220

216-
def save(self):
217-
concat_file = self.app.fastflix.config.work_path / "concat.txt"
221+
def save(self, file_list=None):
222+
concat_file = self.app.fastflix.config.work_path / f"concat_{secrets.token_hex(4)}.txt"
218223
with open(concat_file, "w") as f:
219224
f.write(
220-
"\n".join([f"file '{self.folder_name}{os.sep}{item}'" for item in self.concat_area.table.get_items()])
225+
"\n".join(
226+
[
227+
f"file '{self.folder_name}{os.sep}{item}'"
228+
for item in (self.concat_area.table.get_items() if not file_list else file_list)
229+
]
230+
)
221231
)
222232
self.main.input_video = concat_file
223233
self.main.source_video_path_widget.setText(str(self.main.input_video))
@@ -230,8 +240,9 @@ def save(self):
230240
self.main.widgets.deinterlace.setChecked(False)
231241
self.hide()
232242
self.main.page_update(build_thumbnail=True)
233-
error_message(
234-
"Make sure to manually supply the frame rate in the Advanced tab "
235-
"(usually want to set both input and output to the same thing.)",
236-
title="Set FPS in Advanced Tab",
237-
)
243+
# TODO present if images
244+
# error_message(
245+
# "Make sure to manually supply the frame rate in the Advanced tab "
246+
# "(usually want to set both input and output to the same thing.)",
247+
# title="Set FPS in Advanced Tab",
248+
# )

0 commit comments

Comments
 (0)