server: fixes wav not saved correctly and mp3 generation invalid if started from /tmp from another device

This commit is contained in:
2023-08-17 16:49:22 +02:00
parent ca4a4d2432
commit b43bd00fc0
3 changed files with 7 additions and 4 deletions

View File

@@ -108,7 +108,9 @@ class Transcript(BaseModel):
out.close()
# move temporary file to final location
Path(tmp.name).rename(fn)
import shutil
shutil.move(tmp.name, fn.as_posix())
def unlink(self):
self.data_path.unlink(missing_ok=True)