kelciour / movies2anki

Convert movies with subtitles to watch them with Anki. Inspired by subs2srs
GNU Affero General Public License v3.0
302 stars 28 forks source link

Subtitles are merged to fill the "Split Long Phrases" limit. #20

Closed aleksejrs closed 6 months ago

aleksejrs commented 2 years ago

When "Split Long Phrases" is 5, the first two are merged:

1
00:00:33,791 --> 00:00:35,291
Woohoo!

2
00:00:35,333 --> 00:00:37,083
Ya-haa!

3
00:00:37,125 --> 00:00:40,500
Hurry, friends!
Time for another adventure!

When it's 1, supposedly nothing is being merged that is not in the same chunk.

I don't want it to merge multiple short complete sentences into a single hard item.

kelciour commented 2 years ago

Sorry, but I don't understand the issue.

But if it's about "sentence mode", set "Gap between Phrases" to 0 and check the checkbox to activate "sentence mode". Subtitle lines will be joined into sentences and that's it.

For more information about "exact mode", "sentence mode" and "phrase mode" please see https://github.com/kelciour/movies2anki/issues/18#issuecomment-846584694

aleksejrs commented 2 years ago

I do NOT want lines to be joined.

Setting "Split Long Phrases" to 1 helped stop it, and I also explicitly set it to "0" in the source code to prevent any joining.

"Gap between Phrases" was 0.25 and UNchecked.

IIRC, you told me to set some settings as a workaround for some bug with one of the subtitle formats a long time ago.

kelciour commented 2 years ago

Sorry but I still don't understand what the issue here.

To use the "exact mode" (don't join any lines, to generate as many cards as there were subtitles), set "Gap between Phrases" to 0 and uncheck it.

If it doesn't work and Preview button shows different number of subtitles and phrases, maybe backup the add-on's folder, delete the add-on and install the latest version from AnkiWeb.

The same behaviour should be if "Gap between Phrases" was 0.25 and unchecked, but I think it's buggy and won't work,, but I'll fix it someday.

aleksejrs commented 2 years ago

The same behaviour should be if "Gap between Phrases" was 0.25 and unchecked, but I think it's buggy and won't work,, but I'll fix it someday.

Yes, apparently it's that bug.

kelciour commented 6 months ago

I think I fixed it some time ago. The subtitles will be now merged only if the "Gap between Phrase" is enabled.