when i opened anki, all my cards and decks were gone, and there was an error message on the screen. i synced using ankiconnect, and the cards and decks came back, but audio stopped playing on some cards.
i checked the collection.media folder for the cards with missing audio, and the audio files are not present there. i also checked the media trash folder, and it is empty as well. these audio files were added through ankiconnect via asbplayer, not manually through the paperclip/attachment button. audio files that were added directly to the collection.media folder, or added manually through the paperclip button, still play correctly.
i ran the check media tool, and it reports these audio files that aren’t playing as missing.
i also tried restoring from a backup, but this did not change anything, the audio files are still missing.
my question: is there any way to recover these audio files, or are they lost forever if the check media reports that they are missing and they are not in the collection.media folder? if recovery is possible, what steps should i take?
What was it? Usually the best way to recover from data loss involves knowing how you lost the data.
Did you consider retrieving the current version of your collection from AnkiWeb / your other device? If you haven’t yet synced with AnkiWeb on desktop, you should first go to Preferences > Syncing > Log Out, then click Sync to log in again. That will rescan your media and download anything that the server has that you’re missing.
If you have already synced desktop, but you haven’t synced your AnkiDroid device, you can push the same thing from that side, but you need to start in airplane mode so it doesn’t auto-sync when you open. Then you can log out, connect to the internet, and click Sync to log in again.
The backup part makes sense, sadly. Automatic backups only hold your cards and scheduling, not the media. The manual says it straight: “These include the text on your cards and your scheduling information, but do not include sounds or image files.” So restoring one will never bring audio back, however old it is. Only a manual export with “include media” ticked has the files inside.
One thing nobody has asked yet: when Anki opened with everything gone, is there any chance it started on a fresh profile? If it did, you’re looking at a brand new empty collection.media while the old one is still sitting on disk. Worth checking before you write the files off. The data folder is %APPDATA%\Anki2 on Windows, ~/Library/Application Support/Anki2 on Mac, ~/.local/share/Anki2 on Linux. Every profile is a folder in there with its own collection.media. Take one filename from the Check Media list, search the whole drive for it, and if it shows up in an old profile folder just copy the files back into your current one.
About how they got there in the first place: asbplayer creates its cards through AnkiConnect, so the files were written into that one computer’s collection.media and nowhere else. They only reach AnkiWeb if the media sync went through. Media has its own sync state, separate from the cards, so the server can hold your notes with the [sound:...] tags and not the files themselves. That’s the case where logging out and syncing again comes back empty.
If it does come back empty, the notes still have the subtitle text, so mining the same lines again in asbplayer is the fallback.
i don’t remember the exact error text anymore.. i just closed it and tried to get the cards back. unfortunately, i’ve already synced across all my devices. i think the real issue was that the audio files just weren’t being saved to the collection.media folder… but it’s not a big loss anyway! thank you so much for your help​
hello! no new profile appeared for me, and i couldn’t find the audio files from the mined cards in the folder. i’ve already made peace with the loss​
the main thing is that the cards are still there. but anyway, thank you for your help!