Import Media in Importer without updating Notes

It seems I have some media files missing in my decks. I am trying to update the database by importing the apkg files. But to import the media files I have to check on Update Notes. Otherwise it doesn’t import the files. I would appreciate an option that allows media import without having to update my notes.

1 Like

Are you looking only for import solutions? The other way I can think of to do this is –

  • Create a temporary profile and import your apkg into there
  • Go to your Anki2 folder (Managing Files - Anki Manual) for that new profile
  • Copy those media files (or the entire contents of the folder) from that collection.media to the collection-media for your main profile
  • Clean-up –
    • Run Check Media in your main profile to make sure nothing else is missing (and you can delete any unused files)
    • Delete the temporary profile
3 Likes

Anki only copies media when notes are first imported, so you would need to delete+reimport to pull the media in (or import in a new profile and copy it over, as @Danika_Dakika suggested).

3 Likes

I was able to do it later. As for the Importer, it still works without deleting the notes if you just set update notes to always. I was doing this on AnkiDroid and it would’ve been nice if you could just import the media files directly.

Edit: AnkiDroid uses the same Importer as Anki right?

1 Like

As of 2.17, yes.

1 Like

I store my JavaScript files with functions I call from card templates in collection.media folder to avoid code duplication and to use an external code development environment. Does it mean when I published and later re-published my decks the users who downloaded my decks and later downloaded the updated versions never got updated versions of the code? If yes, what is the solution for me? Should I rename of my files on every update?

I think you’d need to make changes to your note, for the media files to be downloaded.

Sorry, I was probably thinking of the old Python implementation. I’ve double-checked the code, and it should be automatically importing changed files under a new name. If it’s not doing that, please file a report on GitHub with minimum reproduction steps.