|
@@ -397,7 +397,6 @@ def gen_video_eng(name_hash,name,text_content, image_urls,sub_titles,avatar):
|
|
|
os.remove(tmp_video_dir+name_hash+'.mp4')
|
|
|
|
|
|
def gen_video_queue(name_hash,name,text_content, image_urls,avatar,user_id):
|
|
|
- print('in the loop')
|
|
|
db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/AI_anchor?charset=utf8mb4')
|
|
|
time_stamp = datetime.fromtimestamp(time.time()).strftime("%Y-%m-%d %H:%M:%S")
|
|
|
txt_content_seperate_by_dot = ''
|
|
@@ -434,7 +433,7 @@ def gen_video_queue(name_hash,name,text_content, image_urls,avatar,user_id):
|
|
|
if left_time < vid_duration:
|
|
|
mailer.send('您本月額度剩下'+str(left_time)+'秒,此部影片有'+duration+'秒, 若要繼續產生影片請至 http://192.168.1.106:8007/confirm_add_value?name_hash='+name_hash+' 加值')
|
|
|
else:
|
|
|
- left_time = left_time - duration
|
|
|
+ left_time = left_time - vid_duration
|
|
|
db.query('UPDATE users SET left_time ='+str(left_time)+' WHERE id='+str(user_id)+';')
|
|
|
notify_group(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4")
|
|
|
#except:
|