Anki-android: [Feature Request] Smart Sync: Only sync media for cards that are not suspended

Created on 17 Nov 2020  路  4Comments  路  Source: ankidroid/Anki-Android

Reproduction Steps
  1. Have a deck with 10,000 sentence cards with images & audio for both vocab & sentences
  2. Use Anki for years, and have ~5000 or so suspended cards that aren't "right" for now: leeches, etc.
  3. Have a budget phone with only limited space available. SD card is an option, but performs too slowly for effective reviews on AnkiDroid if media is stored on external SD.
  4. Sync
  5. Ankidroid tries to download all media for all cards, even if they are suspended
Expected Result

Anki-Android should have an option to only syncs media for cards that are unsuspended. Storage is cheap and easy to use on Anki Desktop. However, due to poor sd performance and expensive on-board storage, not having enough storage is an anki-android specific problem, that I think we can mitigate if we only sync media for unsuspended cards.

Currently you have to choose to either turn on or off media syncing, but it'd be nice to do a smart sync where you still sync all basic card data, but only download and sync media for unsuspended cards.

Alternative would be to get better performance for media on an SD card, though I would still actually prefer a smart sync.

Actual Result

All of your phones storage gets used by cards that aren't being used currently. I have to set the option to not sync media, because if Anki-Android syncs all of my cards, it will use all of my phones storage.

Debug info

N/A

Research

Enter an [x] character to confirm the points below:

  • [x] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
  • [x] I have checked the manual and the FAQ and could not find a solution to my issue
  • [x] I have searched for similar existing issues here and on the user forum
  • [x] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
Enhancement Help Wanted

All 4 comments

Hello! 馃憢 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing

Hmm normally I don't like putting non-Anki Desktop features in, but I am keenly aware of the storage space issue you mention. I have suffered it myself, and the only justification we allow for non-Anki-Desktop features is for things that are specifically problems on mobile. Limited storage space is one of those problems, I agree.

If someone wants to take this on, big idea is:

  1. add it as a preference
  2. ake the preference into account during media operations

Details are:

  1. preference should be per deck group, I believe we may add arbitrary keys to deck group conf (a JSON object?)
  2. check media should check the deck group preference and offer to delete media that no longer meets the preference criteria
  3. sync media should discard (either not request?) media that does not meet the preference

An implementation question:

  • during sync is it possible to not even request the media that you don't want? Hopefully so, otherwise this won't be viable. Syncs would always request (and transfer + discard) data

A possible workaround: effectively "delete" the cards you are no longer working on but making separate parallel decks for them, exporting those decks (without media) and saving those .apkg files somewhere safe, then deleting them from your collection. Not a great workaround, but if your storage is literally full right now it's a way to maybe get yourself moving.

I think the problems could also be solved on Anki side, though maybe not as perfect. It seems significantly easier to write an add-on to stop syncing media of suspended cards. Like this add-on would be helpful, though it is still a little buggy atm:
https://ankiweb.net/shared/info/509423518

I think the problems could also be solved on Anki side, though maybe not as perfect. It seems significantly easier to write an add-on to stop syncing media of suspended cards. Like this add-on would be helpful, though it is still a little buggy atm:
ankiweb.net/shared/info/509423518

I agree. I still think that as a platform specific problem it would be better to be solved in the problematic platform, android. If users still want to sync media between different desktops something like that add-on would be a bit of a pain. You would have to manually move files between devices, or do some device sniffing maybe? Either way it seems like it could be a temporary workaround until this is supported on android potentially.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

snowtimeglass picture snowtimeglass  路  5Comments

Mornon picture Mornon  路  5Comments

david-allison-1 picture david-allison-1  路  5Comments

SimonePols picture SimonePols  路  3Comments

david-allison-1 picture david-allison-1  路  4Comments