tomoya пре 3 недеља
родитељ
комит
2bdb49f08f

+ 2 - 2
backend/app/app/api/api_v1/endpoints/edm_saas_api.py

@@ -240,9 +240,9 @@ async def get_videos(user_id: int):
     response = supabase.table(user_table).select('*').eq('user_id', user_id).execute()
     videos = response.data
     if videos:
-        videos = [VideoInDB(**video) for video in videos]
         return videos
-    return None
+    else:
+        return []
     
 @router.get("/zip2video")
 async def get_video_list(

+ 1 - 1
backend/app/app/core/video_utils.py

@@ -112,7 +112,7 @@ def translate_table(table, lang):
             translator= Translator(to_lang=lang, from_lang=detect(text))
             translation = translator.translate(text)
             print("大標翻譯:",translation)
-            table.loc[i, ['字幕']] = translation
+            table.loc[i, ['大標']] = translation
         if (text:=table.loc[i, ['字幕']].item()):
             print('字幕:',text)
             translator= Translator(to_lang=lang, from_lang=detect(text))