|
@@ -27,7 +27,7 @@ dir_anchor = ''
|
|
|
tool_dest = '/var/www/html/tools/'
|
|
|
|
|
|
|
|
|
-@router.post("/genAvatar_uploadmp3/")
|
|
|
+@router.post("/genAvatar_uploadmp3/", tags=["tools"])
|
|
|
async def genAvatar_uploadmp3(file: UploadFile = File(...)):
|
|
|
name_hash = str(time.time()).replace('.','')
|
|
|
|
|
@@ -35,12 +35,12 @@ async def genAvatar_uploadmp3(file: UploadFile = File(...)):
|
|
|
file_object.write(file.file.read())
|
|
|
|
|
|
|
|
|
- x = threading.Thread(target=makeAvatar, args=(name_hash,17))
|
|
|
+ x = threading.Thread(target=makeAvatar, args=(str(name_hash),17))
|
|
|
x.start()
|
|
|
return {'msg':'ok'}
|
|
|
|
|
|
def makeAvatar(name_hash,avatar):
|
|
|
- call_anchor(name_hash,17)
|
|
|
+ call_anchor(name_hash,avatar)
|
|
|
notify_choozmo('avatar at www.choozmo.com:8168/tools/'+name_hash+'.mp4')
|
|
|
os.remove(dir_sound+name_hash+".mp3")
|
|
|
|