Hi there, I previously synced with Ankihub when my hard drive was getting a bit full up. The sync filled my hard drive until there was no space left, and therefore the sync failed midway.
Since then, I have a large number of cards with broken images. Syncing doesn’t help. I’ve tried unsubscribing and resubscribing to the deck and then syncing again, which doesn’t help. I’ve also tried using the ‘reset local changes’ option, which again doesn’t help.
Does anyone have any ideas about how to force a redownload of all media files?
I do have some media files (e.g. the FA images from earlier decks, as well as the pixorize images, which I know are largely included now but may have one or two missing, especially since that field is protected) that may not be included in the current deck, so I want to avoid anything that may result in losing these.
Just so I’m clear: as you still trying to sync on a device without spare storage, or are you now on a new device?
Assuming you are on a device with sufficient storage, the fist thing I would recommend trying is resetting local changes: Resetting Local Changes
As with any change to a deck, I would recommend making a backup first and protecting any fields you would not to safeguard. I can help you with either, or both, of those if you’d like.
Please let me know if that answers your question, and if there’s anything else I can help with.
@Brian_BH I’ve freed up storage and tried syncing, and have tried on a second device also. RE ‘reset local changes’, as mentioned in the OP, I’ve already tried that prior to making this post unfortunately.
@Ahmed7 The Extra field - potentially others (though I’ve not come across it), but definitely that one, and that’s the main issue, the others are less of a problem.
Sure, here we go. Sorry, I don’t have notifications to my email due to the constant flood from all of the updates on suggestions!
Here it is - as you can see, some are working (I think in particular if they’ve had new images added since it happened, but some of the older ones work), but others are broken. I’ve included a screenshot of both the card view when reviewing, and the edit view (with HTML).
I don’t know if it’s that many - maybe 20%? On doing a media check, it says just over 10,000 images missing.
One thought - perhaps it would be worth me creating a new Anki profile, downloading Anking to that, then syncing it with Ankihub and copy + paste the media folder from there into my original (skipping any that are already in there). I don’t know whether that has the potential to mess with anything, but I would think would be okay (as long as I synced my original with Ankihub first).
Ok, update - so there were a number that I think copied across, though the image in the card in the screenshot still isn’t working. On doing some digging, it seems the file is there, but in my main media folder, it’s 0 bytes, whereas in the fresh install it’s 29.3 MB.
I note there are 3201 images listed as having a file size of 0 Kb. I’ve copied them to a backup folder and will now try deleting them from my main profile and re-copying the media. Fingers crossed.
Webp rather than GIF - I think the most likely cause is that as part of the Ankihub sync process, all files are copied over initially just as a 0 byte file, and then this is one-by-one filled with the file data. However, if this is interrupted, this second step doesn’t happen. However, then if you try to redownload the images, it just checks for the file (which is present) so doesn’t attempt to download.
I think the fix on Ankihub’s end would primarily be to implement a safety check during syncing, in which it tracks filenames that it’s added, as well as tracking files where it’s successfully added the actual file content. At end of sync (or if it generates an error), it compares the added files to those where it’s added the content of a file, and it deletes any files that are in the first list but not the second, and treats them as unsynced.
From a user perspective, if you’re suffering from the same issue, the fix is to go to your collection folder, sort by file size, delete all of the files that are less than 1kb (i.e. 0kb) and then manually copy the media across from a fresh profile (making sure to sync with ankihub and backup first, and skip any that already exist).
It currently seems to be working with that fix - I’ll do some flashcards and report back if there’s an issue, but I can’t see any currently from a quick skim. Thank you everyone for all the help!