|
@@ -142,10 +142,10 @@ async def make_anchor_video_v2(req:request):
|
|
|
img_urls_seperate_by_dot = img_urls_seperate_by_dot[:-1]
|
|
|
time_stamp = datetime.fromtimestamp(time.time())
|
|
|
time_stamp = time_stamp.strftime("%Y-%m-%d %H:%M:%S")
|
|
|
- pk = log_table.insert({'name':req.name,'text_content':txt_content_seperate_by_dot,'image_urls':img_urls_seperate_by_dot,'timestamp':time_stamp})
|
|
|
+ pk = log_table.insert({'name':req.name,'text_content':txt_content_seperate_by_dot,'image_urls':img_urls_seperate_by_dot,'link':'www.choozmo.com:8168/'+name_hash+'.mp4','timestamp':time_stamp})
|
|
|
x = threading.Thread(target=anchor_video_v2, args=(req.name, req.text_content, req.image_urls,int(req.avatar),req.client_id))
|
|
|
x.start()
|
|
|
- return {"msg":"製作影片需要時間,請您耐心等候 稍後可以在www.choozmo.com:8168/"+req.name+".mp4 中觀看"}
|
|
|
+ return {"msg":"製作影片需要時間,請您耐心等候 稍後可以在www.choozmo.com:8168/"+name_hash+".mp4 中觀看"}
|
|
|
|
|
|
manager = ConnectionManager()
|
|
|
@app.websocket("/progress/{client_id}")
|
|
@@ -166,7 +166,7 @@ async def history_input():
|
|
|
statement = 'SELECT * FROM history_input ORDER BY timestamp DESC LIMIT 50'
|
|
|
logs = []
|
|
|
for row in db.query(statement):
|
|
|
- logs.append({'id':row['id'],'name':row['name'],'text_content':row['text_content'].split(','),'image_urls':row['image_urls'].split(',')})
|
|
|
+ logs.append({'id':row['id'],'name':row['name'],'text_content':row['text_content'].split(','),'link':row['link'],'image_urls':row['image_urls'].split(',')})
|
|
|
return logs
|
|
|
|
|
|
def notify_group(msg):
|