Skip to content

Commit

Permalink
Fix note offset not being reset
Browse files Browse the repository at this point in the history
  • Loading branch information
abdnh committed Sep 19, 2024
1 parent e1564da commit 776df9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/importers/ankipro.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ def _import_notetypes(self) -> None:
def _import_cards(self) -> int:
count = 0
for deck in self.decks:
# last_fetched_card_id = None
offset = 0
while True:
params = {
"deck_id": deck.id,
"limit": 20,
"offset": count,
"offset": offset,
}
res = self._api_get(
"notes",
Expand Down Expand Up @@ -214,6 +214,7 @@ def _import_cards(self) -> int:
note.fields[i] = contents
self.mw.col.add_note(note, deck.anki_id)
count += 1
offset += 1

return count

Expand Down

0 comments on commit 776df9d

Please sign in to comment.