Browse Source

Merge branch 'master' of http://git.choozmo.com:3000/choozmo/AI_Anchor_2

huai-sian 3 years ago
parent
commit
8c0b5d1bc4
3 changed files with 11 additions and 8 deletions
  1. 5 4
      api/main.py
  2. 3 2
      html/index.html
  3. 3 2
      html/make_video_slide_eng.html

+ 5 - 4
api/main.py

@@ -1169,20 +1169,21 @@ def gen_video_queue_eng(name_hash,name,text_content, image_urls,sub_titles,avata
         if first(db.query('SELECT * FROM video_queue_status'))['status'] == 1:#only one row in this table, which is the id 1 one
             print('another process running, leave loop')
             break
-        if first(db.query('SELECT COUNT(1) FROM video_queue where video_type=="eng"'))['COUNT(1)'] == 0:
+        if first(db.query('SELECT COUNT(1) FROM video_queue where video_type="eng"'))['COUNT(1)'] == 0:
             print('all finish, leave loop')
             break
-        top1 = first(db.query('SELECT * FROM video_queue where video_type=="eng"'))
+        top1 = first(db.query('SELECT * FROM video_queue where video_type="eng"'))
         try:
             db.query('UPDATE video_queue_status SET status = 1;')
             c = rpyc.connect("localhost", 8858)
             c._config['sync_request_timeout'] = None
             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'],top1['freeTrial']) # method call
-            shutil.copy(tmp_video_dir+top1['name']+'.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')
             notify_group(top1['name']+"(ENG)的影片已經產生完成囉! www.choozmo.com:8168/"+video_sub_folder+['name_hash']+".mp4")
-        except:
+        except Exception as e:
+            logging.error(traceback.format_exc())
             print('video generation error')
             notify_group('影片錯誤')
         db['video_queue'].delete(id=top1['id'])

+ 3 - 2
html/index.html

@@ -149,8 +149,9 @@
                                 技術強大快速部屬、影片經濟效益大
                                 無論內銷外銷、嘴型真實感。</p>
                             <div class="index-CTA">
-                                <a href="./register.html"><button set-lan="html:launch_special" class="CTA-btnA fw-bold">立即註冊</button></a>
-                                <a href="./pricingB.html"><button  set-lan="html:pricing_checkout" class="CTA-btnB fw-bold">早鳥方案</button></a>
+                                <a href="./register.html"><button set-lan="html:pricing_checkout" class="CTA-btnA fw-bold">立即註冊</button></a>
+                                <a href="./pricingB.html"><button  set-lan="html:launch_special" class="CTA-btnB fw-bold">早鳥方案</button></a>
+
                             </div>
                         </div>
                     </div>

+ 3 - 2
html/make_video_slide_eng.html

@@ -181,8 +181,9 @@
                         <!-- fieldsets -->
                         <fieldset>
                             <h3 class="fs-subtitle"><lan">SLIDE Link</lan><img class="ms-1" src="static/img/question.png" alt="" data-bs-toggle="tooltip" data-bs-placement="right" title="請輸入Google Slides連結 Google Slides Link"></h3>
-                            <input id=slide_raw_url type="text" name='t1' class='title_new' value="" set-lan="placeholder:slide_link"/><label for="myCheck">Allow English Lines::</label> 
-                            <input type="checkbox" id="multiLang" > <br/>
+                            <input id=slide_raw_url type="text" name='t1' class='title_new' value="" set-lan="placeholder:slide_link"/>
+                            <!-- <label for="myCheck">Allow English Lines::</label> 
+                            <input type="checkbox" id="multiLang" > <br/> -->
                         </fieldset>
                         <fieldset>
                             <h3 class="fs-subtitle">Choose Character<img class="ms-1" src="static/img/question.png" alt=""