Skip to content

Commit

Permalink
If auto_disperse_after_reschedule is enabled, don't exclude Manual en…
Browse files Browse the repository at this point in the history
…tries
  • Loading branch information
L-M-Sherlock committed Jun 8, 2024
1 parent a0fbb98 commit 150b73f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sync_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def create_comparelog(local_rids: List[int]) -> None:


def review_cid_remote(local_rids: List[int]):
config = Config()
config.load()
local_rid_string = ids2str(local_rids)
# get cids of revlog entries that were not present in the collection before sync
# exclude manual entries and reviews done in filtered decks with rescheduling disabled
Expand All @@ -21,7 +23,7 @@ def review_cid_remote(local_rids: List[int]):
f"""SELECT DISTINCT cid
FROM revlog
WHERE id NOT IN {local_rid_string}
AND ease > 0
{"" if config.auto_disperse_after_reschedule else "AND ease > 0"}
AND (type < 3 OR factor != 0)
"""
) # type: 0=learn, 1=review, 2=relearn, 3=filtered, 4=manual
Expand Down

0 comments on commit 150b73f

Please sign in to comment.