fix sound tags
This commit is contained in:
1 parent
581d238743
commit
a2e6e66bcf
1 file changed
+3
-2
@@ -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']);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user