Skip to content

Commit

Permalink
Solve GH-14. Update plugin to avoid float int type mismatch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauville committed Mar 31, 2021
1 parent 3fde48c commit 7c05eae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/Import Kanji Koohii Progress/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def processCard(nr, kanji, keyword, lastseen, due, box, fails, passes):
i = min(150, card.ivl)
ivlPenalty = (i ** 2) / 10 - 1.065 * max(0, (i ** 2.26) / 40 - 25 * math.sqrt(i))
card.factor = max(2000, card.factor - ivlPenalty) # If the interval is especially long, make it harder
card.factor = int(round(card.factor))

# Card type
card.type = 2 # Due
Expand Down

0 comments on commit 7c05eae

Please sign in to comment.