Commit graph

4297 commits

Author SHA1 Message Date
Damien Elmes
1e3080ebdc update empty cards hook
Closes #515
2020-05-20 13:41:09 +10:00
Damien Elmes
7f011bd26f tidy up Qt import 2020-05-20 13:38:55 +10:00
Damien Elmes
f27128418c Merge pull request #625 from evandroforks/fixed_check_box_called_twice
Fixed clayout.py rendering the contents twice when clicked
2020-05-20 12:48:48 +10:00
Damien Elmes
bb9da63433 Merge pull request #626 from evandroforks/fix_previewer_button
Fixed previewer button not resetting the state when the preview
2020-05-20 12:48:17 +10:00
Damien Elmes
020572f9d9 Merge pull request #627 from evandroforks/add_missing_anki_icon_to_preview_window
Added missing Anki icon to qt/aqt/previewer.py
2020-05-20 12:47:33 +10:00
evandrocoan
0292bea4d1 Fixed clayout.py rendering the contents twice when clicked
https://stackoverflow.com/questions/36808257/pyqt-radiobutton-ischecked-is-executed-twice
2020-05-19 20:17:20 -03:00
evandrocoan
1261266a4b Added missing Anki icon to qt/aqt/previewer.py 2020-05-19 19:43:18 -03:00
evandrocoan
b690a51a5c Fixed previewer button not resetting the state when the preview
window is closed by its X button
2020-05-19 19:24:54 -03:00
Damien Elmes
390b358e3f Merge pull request #613 from evandroforks/add_missing_file_descriptors_close
Add missing close file descriptors using context managers
2020-05-19 14:39:07 +10:00
Damien Elmes
3c2a791800 Merge pull request #624 from evandroforks/deprecate_pacman
Deprecated pacman usage because its is failing out of nowhere,
2020-05-19 13:15:37 +10:00
Damien Elmes
1cbb1bdbd0 catch protobuf error as well
Sad that we can't exhaustively match protobuf oneofs in
Python :-(
2020-05-19 13:10:20 +10:00
evandrocoan
b8b1bb5c64 Deprecated pacman usage because its is failing out of nowhere,
probably a server is down. Anyways, directly unziping rsync is
faster. And soo, we will have builtin support for msys2:
https://github.com/actions/virtual-environments/pull 632
2020-05-18 23:49:28 -03:00
Damien Elmes
c78e8425aa automatically omit notes or cards table when possible 2020-05-19 11:27:02 +10:00
evandrocoan
c1c2e4d4e0 Simplified csvfile.py super call __del__ call 2020-05-18 16:20:33 -03:00
evandrocoan
1faf7450e4 Explicitly close the importer file descriptor
https://github.com/ankitects/anki/pull 613
2020-05-18 15:54:20 -03:00
evandrocoan
4fe92bfc6b Add missing close file descriptors using context managers 2020-05-18 15:54:20 -03:00
Damien Elmes
e8f0fd4d3b simplify the migration popup
Avoid presenting the user with a wall of text they may not understand,
default to proceeding, and quit if the user cancels.
2020-05-18 20:15:59 +10:00
Damien Elmes
bcb71bbf2d Merge pull request #610 from evandroforks/ask_confirmation_before_moving_anki_collection
Ask user confirmation before moving the Anki directory
2020-05-18 19:44:27 +10:00
Damien Elmes
b7489cdb75 Merge pull request #619 from evandroforks/fix_empty_sound_tags
Also fix legacy.py::anki.sound._soundReg accepting empty tags
2020-05-18 19:31:22 +10:00
Damien Elmes
349c5b378d Merge pull request #620 from evandroforks/remove_unused_var
Remove unused t = time.time() variable on qt/aqt/browser.py
2020-05-18 19:20:08 +10:00
Damien Elmes
5e1583df59 fix unit test bug triggered by low resolution win32 timer
We don't yet have a remove_note(), so just remove all cards for now.
2020-05-18 19:02:54 +10:00
Damien Elmes
8a83eaebdc fix python3.7 lint issue 2020-05-18 18:08:57 +10:00
Damien Elmes
facbe53649 fix cutoff adjustment test in other timezones 2020-05-18 14:08:02 +10:00
Damien Elmes
4fd9aaa925 add alpha warning 2020-05-18 13:36:51 +10:00
Damien Elmes
01ebe964e9 bytes->blob in sql 2020-05-18 13:36:45 +10:00
Damien Elmes
3e156fdb49 bump version 2020-05-18 12:50:20 +10:00
Damien Elmes
4438be2c8d protobuf tidyups 2020-05-18 09:26:14 +10:00
Damien Elmes
e894125620 use empty buffer if the other map is empty in dconf 2020-05-18 08:12:27 +10:00
Damien Elmes
ef88cb59e6 fix syncing 2020-05-17 20:52:02 +10:00
Damien Elmes
94722c4fbb minor tidyups in decks.py 2020-05-17 20:13:29 +10:00
Damien Elmes
e6379bc4d0 update current note type in backend 2020-05-17 20:01:16 +10:00
Damien Elmes
e230f360e9 ensure notetype name unique on add as well 2020-05-17 19:41:47 +10:00
Damien Elmes
b676522e5c fix renaming corner cases and decks.update()
- .update() should update a single deck and preserve usn by default,
as that's what existing code expects
- decks are automatically renamed when they conflict with an existing
name
2020-05-17 19:07:15 +10:00
Damien Elmes
2c19e171ed handle deletion of default deck in backend; use + instead of _ 2020-05-17 15:22:19 +10:00
Damien Elmes
6728da62c5 fix shared deck conf warning 2020-05-17 14:37:59 +10:00
Damien Elmes
336349d8d1 update before_upload() 2020-05-17 14:13:21 +10:00
Damien Elmes
a682865169 move deck config to protobuf 2020-05-17 13:28:41 +10:00
Damien Elmes
e85911c4e4 add option to limit deck tree counts to a particular node 2020-05-17 08:38:49 +10:00
Damien Elmes
ab97eaaf15 use deck tree for new/review count calculation
- wins back the performance lost by the decks and dconf not being
in memory, and the overhead of serializing data for DB calls
- card counts are no longer capped to 1000
- learn counts are currently still calculated separately - can't merge
v1 counts without changing the existing behaviour
- partially rendering the tree may yield more savings
2020-05-16 20:28:03 +10:00
Damien Elmes
17efa85d75 update rusqlite 2020-05-16 19:49:08 +10:00
Damien Elmes
e36e23b563 when merging day# in deck, make sure to reset older values 2020-05-16 15:58:25 +10:00
Damien Elmes
8a42896fb8 speed up children() and add deck_and_child_ids() 2020-05-16 15:40:07 +10:00
Damien Elmes
07ee7d6f74 rework and merge updateCutoff
- the old "mutate but don't save" approach to resetting the "done today"
counts no longer works, and was inefficient anyway - now we just check
the day when returning the count
- remove separate implementation for v1 scheduler

This is a stop-gap solution - a bigger refactor will need to wait
until the deck/note type changes have stabilized.
2020-05-16 15:14:16 +10:00
Damien Elmes
c138917773 formatting 2020-05-16 14:59:47 +10:00
Damien Elmes
2e5f745b85 use the latest day when converting from legacy deck 2020-05-16 14:58:14 +10:00
Damien Elmes
b3205e5d5d only update active when selecting deck/resetting
We were previously doing this every time a card was answered.
2020-05-16 14:57:46 +10:00
Damien Elmes
70afc782ca add a unit test for deck counts 2020-05-16 14:07:48 +10:00
Damien Elmes
f76b82d8ae add find_deck_in_tree() 2020-05-16 13:05:20 +10:00
Damien Elmes
afdab1beef save profile stats to file instead of generating report
Can use an external tool like snakeviz to query them after a run.
2020-05-16 12:53:01 +10:00
Damien Elmes
2183e16152 fix lint issues 2020-05-16 12:20:20 +10:00