anki-connect icon indicating copy to clipboard operation
anki-connect copied to clipboard

Any way to change the position of a card in the new cards queue?

Open adaszko opened this issue 6 years ago • 4 comments

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!

adaszko avatar Sep 06 '19 06:09 adaszko

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.

sgallag-insta avatar May 31 '21 16:05 sgallag-insta

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.

TobiasWehrum avatar Oct 05 '21 22:10 TobiasWehrum

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)

thiswillbeyourgithub avatar Oct 19 '21 09:10 thiswillbeyourgithub

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!

TobiasWehrum avatar Oct 19 '21 12:10 TobiasWehrum