anki-connect
anki-connect copied to clipboard
Any way to change the position of a card in the new cards queue?
Hi and thank you for creating AnkiConnect.
I couldn't find any way to change a position of a card in the queue which is something I'd find very useful given my deck has thousands of unseen cards. Is there a way to do that? Are there plans to implement it if it's not currently possible?
Thank you!
I also was struggling to find an answer to this question so I will post an answer here in case anyone else stumbles across this:
If you just want to move a card to the beginning of the queue, you can use relearnCards.
If you want more fine-grained control of the queue, it looks like you should be able to use updateCompleteDeck, although I haven't tried this myself.
I think right now the only way to actually set due values to any value you want is via updateCompleteDeck, and if you need to do that, you're in for a ride.
You need to supply the cards you want to set (with all their existing data and the new due value), their notes and their models (reading the code, maybe the model with only id is enough here), even if you aren't changing the notes and the models. Also for some reason some fields are named differently to cardsInfo: cardId -> id, note -> nid, interval -> ivl. It seems fairly complicated and I tried, but couldn't get it to work.
It looks like in the future setSpecificValueOfCard from https://github.com/FooSoft/anki-connect/pull/283 might be able to do this more easily.
Author of PR #283 here: just saying that I created the method setSpecificValueOfCard to change the due order in filtered decks. I don't know exactly how it would work outside of filtered decks.
(Btw it was for using ML to reduce daily load of reviews if you're interested)
For what it's worth, I've since started using #283's setSpecificValueOfCard for exactly this and so far it seems to be working well. Thanks for making it, @thiswillbeyourgithub!