Open LorenzHorvath opened 1 month ago
Thanks for reporting! This is unfortunately a known problem with no automatic solution, as of now. In "Ultimate Geography" we work around this by creating a "dummy" deck with the deleted cards, so that the user can import the "dummy" deck (hence moving the cards into it) and then delete it, but this is not really a viable solution for collaboration.
I'm not quite sure what would be the best solution — one option might be to have an extra "deleted.yaml
" file in each CrowdAnki repo (or maybe just a field in the JSON??), with the guids/uuids of deleted notes, which would be automatically updated when deleting notes, and on the import side the user would be asked whether they want to delete the remotely deleted notes (and depending on the user's choice either delete them or tag them as something like "crowdanki_deleted", and in both cases ignore them on re-export). The main disadvantage is that the list of deleted notes could never really be pruned. (There might be some others that I can't think of...) (Undeletion would be handled by removing the uuid from the "deleted" list.)
A more elegant (but in practice also far more complicated...) solution would be to rely on the git repo history to track whether (when importing an existing deck) the absence of a note (i.e. that it is present in the local collection but not in the imported deck) is due to the note having been remotely removed or never present (just like Git normally knows when files/lines are deleted when pulling). The disadvantage would be that this would rely on the diffs being sufficiently clean that git can reliably distinguish deleted notes, and that it'd rely on the deck being imported from a git repo and not just from a file/directory.
One idea on the deck side would be to have a deck version number tag, e.g. "v1". When preparing to push again, add "v2" and remove "v1" for all cards. When others pull, any cards which have "v1" (or don't have "v2") can be deleted.
Thanks for the reply!
A "deleted.yaml" also was the first thing that came to my mind, would surely be a nice addition to the addon!
Our makeshift solution is quite similar to @wyohm's, we just add a DELETE tag to each card we want to "delete" and make sure to suspend all cards tagged DELETE after each pull. Not a nice solution of course, but one that works and doesn't rely on the other party making good on their promise of deleting cards marked for deletion in some way or another before committing.
Hey!
I've recently stumbled across an issue whilst collaborating on a deck with a colleague:
Is there anything to be done about this? I couldn't find any config option regarding this issue. 😅