fix sound tags

This commit is contained in:
polv committed 2022-04-28 12:34:44 +07:00
1 parent 581d238743
commit a2e6e66bcf
1 file changed
+3 -2
+3 -2
View File
@@ -35,7 +35,8 @@ const soundTag = {
}; };
export async function addSoundTag(query: string, fieldNames: string[]) { export async function addSoundTag(query: string, fieldNames: string[]) {
query += ' (' + fieldNames.map((f) => `-${f}:`).join(' OR ') + ')'; query +=
' (' + fieldNames.map((f) => `(-${f}: -${f}:[sound:*)`).join(' OR ') + ')';
const anki = new AnkiConnect(); const anki = new AnkiConnect();
anki anki
@@ -82,5 +83,5 @@ export async function addSoundTag(query: string, fieldNames: string[]) {
} }
if (require.main === module) { if (require.main === module) {
addSoundTag('jp.takoboto', ['SentenceAudio', 'JapaneseAudio']); addSoundTag('note:jp.takoboto', ['SentenceAudio', 'JapaneseAudio']);
} }