diff --git a/anki/collection.py b/anki/collection.py index d619f7aaa..57e82a60c 100644 --- a/anki/collection.py +++ b/anki/collection.py @@ -33,7 +33,6 @@ defaultConf = { 'sortType': "noteFld", 'sortBackwards': False, 'addToCur': True, # add new to currently selected deck? - 'replayBoth': True, # include question when replaying answer? } # this is initialized by storage.Collection diff --git a/anki/decks.py b/anki/decks.py index 512efe572..fe116e32f 100644 --- a/anki/decks.py +++ b/anki/decks.py @@ -73,6 +73,7 @@ defaultConf = { 'maxTaken': 60, 'timer': 0, 'autoplay': True, + 'replayq': True, 'mod': 0, 'usn': 0, } diff --git a/anki/sound.py b/anki/sound.py index 6184d34c0..1fdfa68c9 100644 --- a/anki/sound.py +++ b/anki/sound.py @@ -10,9 +10,12 @@ from anki.utils import namedtmp, tmpdir, isWin, isMac # Shared utils ########################################################################## -def playFromText(text): +def playFromText(text, exclude=""): + reg = "\[sound:(.*?)\]" fnames = {} - for match in re.findall("\[sound:(.*?)\]", text): + for match in re.findall(reg, exclude): + fnames[match] = True + for match in re.findall(reg, text): if match in fnames: continue fnames[match] = True