To @kelcior: movies2anki creates only one card for these downloaded with youtube-dl, German subtitles, VTT, cause an error:

Caught exception:
Traceback (most recent call last):
  File "/home/fc/.local/share/Anki2/addons21/939347702/", line 1515, in start
  File "/home/fc/.local/share/Anki2/addons21/939347702/", line 1628, in startSingleMode
  File "/home/fc/.local/share/Anki2/addons21/939347702/", line 905, in create_subtitles
    en_subs = self.load_subtitle(self.en_srt, self.is_ignore_sdh_subtitle, self.join_lines_separator, self.join_sentences_separator, self.is_gap_phrases)
  File "/home/fc/.local/share/Anki2/addons21/939347702/", line 701, in load_subtitle
    return read_subtitles(file_content, is_ignore_SDH, join_lines_separator, join_sentences_separator, is_gap_phrases)
  File "/home/fc/.local/share/Anki2/addons21/939347702/", line 188, in read_subtitles
    sub_end = srt_time_to_seconds(sub_timecode[1].strip())
  File "/home/fc/.local/share/Anki2/addons21/939347702/", line 124, in srt_time_to_seconds
    return int(major[0]) * 3600 + int(major[1]) * 60 + int(major[2]) + float(minor) / 1000
ValueError: could not convert string to float: '519 align:start position:0%'

If the subtitles are converted into SRT with youtube-dl’s --convert-subs=srt, movies2anki creates only one card with the whole subtitle text in the Express field and “” in the first one, no matter the Split Long Phrases, Gap or Movies vs Phrases options.


About vtt, I’ll look for a way to fix it sometime later.

About srt, currently there’a a bug, but if set “Gap Between Phrases” to 0 and uncheck it, everthing should be okay.


1 Like