|
@@ -267,16 +267,16 @@ def gen_video_queue_eng(name_hash,name,text_content, image_urls,sub_titles,avata
|
|
time_stamp = datetime.fromtimestamp(time.time()).strftime("%Y-%m-%d %H:%M:%S")
|
|
time_stamp = datetime.fromtimestamp(time.time()).strftime("%Y-%m-%d %H:%M:%S")
|
|
txt_content_seperate_by_dot = ''
|
|
txt_content_seperate_by_dot = ''
|
|
for txt in text_content:
|
|
for txt in text_content:
|
|
- txt_content_seperate_by_dot += txt+","
|
|
|
|
- txt_content_seperate_by_dot = txt_content_seperate_by_dot[:-1]
|
|
|
|
|
|
+ txt_content_seperate_by_dot += txt+",%"
|
|
|
|
+ txt_content_seperate_by_dot = txt_content_seperate_by_dot[:-2]
|
|
img_urls_seperate_by_dot = ''
|
|
img_urls_seperate_by_dot = ''
|
|
for iurl in image_urls:
|
|
for iurl in image_urls:
|
|
img_urls_seperate_by_dot += iurl+","
|
|
img_urls_seperate_by_dot += iurl+","
|
|
img_urls_seperate_by_dot = img_urls_seperate_by_dot[:-1]
|
|
img_urls_seperate_by_dot = img_urls_seperate_by_dot[:-1]
|
|
subtitles_seperate_by_dot = ''
|
|
subtitles_seperate_by_dot = ''
|
|
for sub in sub_titles:
|
|
for sub in sub_titles:
|
|
- subtitles_seperate_by_dot += sub+","
|
|
|
|
- subtitles_seperate_by_dot = subtitles_seperate_by_dot[:-1]
|
|
|
|
|
|
+ subtitles_seperate_by_dot += sub+",%"
|
|
|
|
+ subtitles_seperate_by_dot = subtitles_seperate_by_dot[:-2]
|
|
db['video_queue'].insert({'name_hash':name_hash,'name':name,'text_content':txt_content_seperate_by_dot,'image_urls':img_urls_seperate_by_dot,'subtitles':subtitles_seperate_by_dot,'avatar':avatar,'timestamp':time_stamp})
|
|
db['video_queue'].insert({'name_hash':name_hash,'name':name,'text_content':txt_content_seperate_by_dot,'image_urls':img_urls_seperate_by_dot,'subtitles':subtitles_seperate_by_dot,'avatar':avatar,'timestamp':time_stamp})
|
|
while True:
|
|
while True:
|
|
if first(db.query('SELECT * FROM video_queue_status'))['status'] == 1:#only one row in this table, which is the id 1 one
|
|
if first(db.query('SELECT * FROM video_queue_status'))['status'] == 1:#only one row in this table, which is the id 1 one
|
|
@@ -291,7 +291,7 @@ def gen_video_queue_eng(name_hash,name,text_content, image_urls,sub_titles,avata
|
|
c = rpyc.connect("localhost", 8878)
|
|
c = rpyc.connect("localhost", 8878)
|
|
c._config['sync_request_timeout'] = None
|
|
c._config['sync_request_timeout'] = None
|
|
remote_svc = c.root
|
|
remote_svc = c.root
|
|
- my_answer = remote_svc.call_video_eng(top1['name_hash'],top1['name'],top1['text_content'].split(','), top1['image_urls'].split(','),top1['subtitles'].split(','),top1['avatar']) # method call
|
|
|
|
|
|
+ my_answer = remote_svc.call_video_eng(top1['name_hash'],top1['name'],top1['text_content'].split(',%'), top1['image_urls'].split(','),top1['subtitles'].split(',%'),top1['avatar']) # method call
|
|
shutil.copy(tmp_video_dir+top1['name_hash']+'.mp4',video_dest+top1['name_hash']+'.mp4')
|
|
shutil.copy(tmp_video_dir+top1['name_hash']+'.mp4',video_dest+top1['name_hash']+'.mp4')
|
|
os.remove(tmp_video_dir+top1['name_hash']+'.mp4')
|
|
os.remove(tmp_video_dir+top1['name_hash']+'.mp4')
|
|
except:
|
|
except:
|