Browse Source

add multi lang

ming 3 years ago
parent
commit
311850975c
1 changed files with 4 additions and 3 deletions
  1. 4 3
      api/main.py

+ 4 - 3
api/main.py

@@ -216,9 +216,10 @@ async def make_anchor_video(req:models.request,token: str = Depends(oauth2_schem
     for idx in range(len(req.image_urls)):
         if 'http' not in req.image_urls[idx]:
             req.image_urls[idx] = 'http://'+req.image_urls[idx]
-    for txt in req.text_content:
-        if re.search('[a-zA-Z]', txt) !=None:
-            return {'msg':'輸入字串不能包含英文字!'}
+    if req.multiLang==0:
+        for txt in req.text_content:
+            if re.search('[a-zA-Z]', txt) !=None:
+                return {'msg':'輸入字串不能包含英文字!'}
     name_hash = str(time.time()).replace('.','')
     for imgu in req.image_urls:
         try: