Skip to content

Commit

Permalink
Merge pull request #17 from xrishox/master
Browse files Browse the repository at this point in the history
fix crash on timeless chapters
  • Loading branch information
kanjieater authored Oct 20, 2024
2 parents c466d6c + a65eaa3 commit 520865d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subplz/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def from_file(cls, path, cache_inputs={}, whole=False, lang="ja"):
return title, [
cls(
stream=ffmpeg.input(
path, ss=float(chapter["start_time"]), to=float(chapter["end_time"])
path, ss=chapter["start_time"], to=chapter["end_time"]
),
duration=float(chapter["end_time"]) - float(chapter["start_time"]),
path=path,
Expand All @@ -149,6 +149,7 @@ def from_file(cls, path, cache_inputs={}, whole=False, lang="ja"):
cache=cache,
)
for chapter in info["chapters"]
if (float(chapter['end_time']) - float(chapter['start_time'])) > 1
]


Expand Down

0 comments on commit 520865d

Please sign in to comment.