Skip to content

Commit 902b388

Browse files
committed
more
1 parent 606ed98 commit 902b388

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
build1:
1919
strategy:
2020
matrix:
21-
python-version: ['3.10']
21+
python-version: ['3.12']
2222
runs-on: ubuntu-latest
2323
timeout-minutes: 20
2424
steps:

auto_editor/edit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,14 @@ def make_media(tl: v3, output: str) -> None:
292292

293293
log.conwrite("Writing output file")
294294

295-
making_subs = ctr.allow_subtitle and not args.sn
295+
number_subs = 0 if tl.v1 is None else len(tl.v1.source.subtitles)
296+
making_subs = number_subs > 0 and ctr.allow_subtitle and not args.sn
296297
old_out = os.path.join(temp, f"oldout.{out_ext}")
297298
mux_quality_media(
298299
ffmpeg,
299300
visual_output,
300301
audio_output,
301-
0 if tl.v1 is None else len(tl.v1.source.subtitles),
302+
number_subs,
302303
apply_later,
303304
ctr,
304305
old_out if making_subs else output,

0 commit comments

Comments
 (0)