dxing97 / subs2cia

Condensed Immersive Audiovisual media generator from subtitles for language learning
MIT License
89 stars 10 forks source link

Can ignore chapters in addition to time ranges #7

Closed killergerbah closed 3 years ago

killergerbah commented 3 years ago

I was attempting to extract audio from a TV show where the OP and ED was not in exactly the same time range every episode. These sections were however labeled as chapters in the MKV file. This diff allows these sections to be specified via chapter name and ignored using --ignore-chapter. The ignored chapters are converted into time ranges which are merged with the ranges provided by --ignore-range in choose_subtitle.

dxing97 commented 3 years ago

Really nice work, should make OP/ED ignoring more consistent. I would prefer having chapter_timestamps() emit a logging.warning in case a supplied chapter title doesn't exist though.

killergerbah commented 3 years ago

Thanks, updated with a log. It may be worth adding an option to ignore by chapter index in another diff to make typos less likely.