From 98e55e26bc299179777c7fed765fca2fed7f19ab Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Thu, 30 Jan 2020 16:44:57 -0800 Subject: [PATCH] use DECK_STD --- pylib/anki/consts.py | 1 + pylib/anki/decks.py | 2 +- pylib/anki/storage.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pylib/anki/consts.py b/pylib/anki/consts.py index 6d69f6151..a8d4a99b6 100644 --- a/pylib/anki/consts.py +++ b/pylib/anki/consts.py @@ -28,6 +28,7 @@ MEDIA_ADD = 0 MEDIA_REM = 1 # Kind of decks +DECK_STD = 0 # dynamic deck order DYN_OLDEST = 0 diff --git a/pylib/anki/decks.py b/pylib/anki/decks.py index c2998896f..14031c454 100644 --- a/pylib/anki/decks.py +++ b/pylib/anki/decks.py @@ -27,7 +27,7 @@ defaultDeck = { "conf": 1, "usn": 0, "desc": "", - "dyn": 0, # anki uses int/bool interchangably here + "dyn": DECK_STD, # anki uses int/bool interchangably here "collapsed": False, # added in beta11 "extendNew": 10, diff --git a/pylib/anki/storage.py b/pylib/anki/storage.py index b3099780e..3950e77a6 100644 --- a/pylib/anki/storage.py +++ b/pylib/anki/storage.py @@ -111,7 +111,7 @@ def _upgrade(col, ver) -> None: if ver < 3: # new deck properties for d in col.decks.all(): - d["dyn"] = 0 + d["dyn"] = DECK_STD d["collapsed"] = False col.decks.save(d) if ver < 4: