When cards are reset, the revlog generates entries for those cards with a duration of 0. The current SQL query in the add-on counts these resets as reviewed cards causing the 'cards/min' calculation to be higher than the true value. This problem is exaggerated for large decks — resetting 233k cards caused the add-on to claim I had a review speed of 3,447,525 cards/min.
Steps to Reproduce
- Import deck
- Go to browser, select all cards, reset
- Check cards/min and time remaining stats
Expected Behaviour
The add-on should only calculate speed based on cards that were actually reviewed, ignoring logs generated by administrative actions like resetting.
Suggested Fix
In the renderStats function, the SQL query can be modified to exclude logs with a time value of 0.
# adding 'and time > 0' to filter out resets
cards, thetime = self.mw.col.db.first("""select count(), sum(time)/1000 from revlog where id > ? and time > 0""", query_time_param * 1000)
Versions
Anki Version: 25.09.2
Add-on Version: v2.9
When cards are reset, the
revloggenerates entries for those cards with a duration of0. The current SQL query in the add-on counts these resets as reviewed cards causing the 'cards/min' calculation to be higher than the true value. This problem is exaggerated for large decks — resetting 233k cards caused the add-on to claim I had a review speed of 3,447,525 cards/min.Steps to Reproduce
Expected Behaviour
The add-on should only calculate speed based on cards that were actually reviewed, ignoring logs generated by administrative actions like resetting.
Suggested Fix
In the
renderStatsfunction, the SQL query can be modified to exclude logs with a time value of 0.Versions
Anki Version: 25.09.2
Add-on Version: v2.9