diff --git a/LunaTranslator/LunaTranslator/gui/showword.py b/LunaTranslator/LunaTranslator/gui/showword.py
index 243053e7..c23d520c 100644
--- a/LunaTranslator/LunaTranslator/gui/showword.py
+++ b/LunaTranslator/LunaTranslator/gui/showword.py
@@ -119,6 +119,7 @@ class AnkiWindow(QDialog):
}
)
media = []
+ tempfiles=[]
for k, _ in [("audio", self.audiofile), ("image", self.cropedimagepath)]:
if _:
media.append(
@@ -130,6 +131,7 @@ class AnkiWindow(QDialog):
}
]
)
+ tempfiles.append(_)
else:
media.append([])
@@ -145,7 +147,11 @@ class AnkiWindow(QDialog):
media[0],
media[1],
)
-
+ for _ in tempfiles:
+ try:
+ os.remove(_)
+ except:
+ pass
class searchwordW(closeashidewindow):
getnewsentencesignal = pyqtSignal(str, bool)
diff --git a/LunaTranslator/LunaTranslator/myutils/ankiconnect_config.py b/LunaTranslator/LunaTranslator/myutils/ankiconnect_config.py
index fb43e4a2..1bdd105f 100644
--- a/LunaTranslator/LunaTranslator/myutils/ankiconnect_config.py
+++ b/LunaTranslator/LunaTranslator/myutils/ankiconnect_config.py
@@ -15,6 +15,7 @@ model_htmlfront = """
{{explain}}
{{image}}
+