mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
fix
This commit is contained in:
parent
a001ba38c7
commit
eda4c303ba
@ -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)
|
||||
|
@ -15,6 +15,7 @@ model_htmlfront = """
|
||||
{{explain}}
|
||||
<br>
|
||||
{{image}}
|
||||
<div class='icon_audio'>{{audio}}</div>
|
||||
"""
|
||||
model_htmlback = """
|
||||
{{word}}
|
||||
@ -22,4 +23,5 @@ model_htmlback = """
|
||||
{{explain}}
|
||||
<br>
|
||||
{{image}}
|
||||
<div class='icon_audio'>{{audio}}</div>
|
||||
"""
|
||||
|
@ -1,5 +1,5 @@
|
||||
from myutils.config import globalconfig
|
||||
import threading
|
||||
import threading, os
|
||||
|
||||
|
||||
class TTSbase:
|
||||
@ -71,4 +71,4 @@ class TTSbase:
|
||||
voice = globalconfig["reader"][self.typename]["voice"]
|
||||
voice_index = self.voicelist.index(voice)
|
||||
fname = self.speak(content, rate, voice, voice_index)
|
||||
return fname
|
||||
return os.path.abspath(fname)
|
||||
|
Loading…
x
Reference in New Issue
Block a user