Skip to content

Commit

Permalink
When cutting don't add chapters if there weren't any before
Browse files Browse the repository at this point in the history
  • Loading branch information
faissaloo committed Jan 23, 2021
1 parent 3fc04d9 commit afa580f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sponskrub/sponskrub.d
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,18 @@ Options:
} else {
writeln("Surgically removing the shilling...");
auto content_times = timestamps_to_keep(new_chapter_times);
auto cut_chapter_times = "";

if (input_chapters_count > 0) {
cut_chapter_times = generate_chapters_metadata(calculate_timestamps_for_kept_clips(content_times));
}

ffmpeg_status = run_ffmpeg_filter(
input_filename,
output_filename,
cut_and_cat_clips_filter(content_times, get_file_category(input_filename)),
get_file_category(input_filename),
generate_chapters_metadata(calculate_timestamps_for_kept_clips(content_times))
cut_chapter_times
);
}

Expand Down

0 comments on commit afa580f

Please sign in to comment.