ming 3 年之前
父節點
當前提交
dfae37cce1
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      OpenshotService/openshot_video_generator.py
  2. 1 1
      api/main.py

+ 2 - 0
OpenshotService/openshot_video_generator.py

@@ -257,6 +257,7 @@ def generate_subtitle_image_ENG(name_hash,text_content):
 def anchor_video_v2(name_hash,name,text_content, image_urls,multiLang,avatar):
     print(os.getcwd())
     print('sub image made')
+    print(multiLang)
     file_prepare(name, name_hash, text_content,image_urls,multiLang)
     sub_list=generate_subtitle_image(name_hash,text_content)
     
@@ -540,6 +541,7 @@ def anchor_video_eng(name_hash,name,text_content, image_urls,sub_titles,avatar):
 
 class video_service(rpyc.Service):
     def exposed_call_video(self,name_hash,name,text_content, image_urls,multiLang,avatar):
+        print('ML:'+str(multiLang))
         anchor_video_v2(name_hash,name,text_content, image_urls,multiLang,avatar)
     def exposed_call_video_eng(self,name_hash,name,text_content, image_urls,sub_titles,avatar):
         anchor_video_eng(name_hash,name,text_content, image_urls,sub_titles,avatar)

+ 1 - 1
api/main.py

@@ -421,7 +421,7 @@ def gen_video_queue(name_hash,name,text_content, image_urls,avatar,multiLang,use
         img_urls_seperate_by_dot += iurl+","
     img_urls_seperate_by_dot = img_urls_seperate_by_dot[:-1]
     
-    db['video_queue'].insert({'name_hash':name_hash,'name':name,'text_content':txt_content_seperate_by_dot,'image_urls':img_urls_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,'multiLang':multiLang,'avatar':avatar,'timestamp':time_stamp})
     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