Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to create duplicate note still exports the word's audio to Anki #87

Closed
Mansive opened this issue May 14, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Mansive
Copy link

Mansive commented May 14, 2024

If I create a note from Yomitan for "跳ね回る" that has [sound:NhkLocal_跳ね回る_はねまわる.mp3] in the note's Audio field, and I attempt to create a duplicate note from JL for "跳ね回る", then JL will prevent its creation as expected. However, using the Check Media option in Anki will show that JL_audio_はねまわる_跳ね回る.mp3 is in the media folder as an unused file despite JL not creating a note.

This does not happen for notes I've created from JL; for example, create a note from JL for "鮮やか" with [sound:JL_audio_あざやか_鮮やか.mp3] in the Audio field, and then attempt to create a duplicate note. JL will prevent the note creation and Anki does not show any new unused files.

@rampaa
Copy link
Owner

rampaa commented May 14, 2024

I think this is an AnkiConnect bug. Even if I simply call the canAddNotes action with a note that has audio, the audio file is still created under the collection.media folder. Same behavior is observed when addNote is called with its allowDuplicate option set to false.

Ideally this should be fixed by AnkiConnect itself. If that's not likely, I can probably sidestep this behavior somehow.

@rampaa rampaa closed this as completed in 5881b26 May 15, 2024
@rampaa rampaa added the bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants