ming преди 3 години
родител
ревизия
594d4c318a
променени са 1 файла, в които са добавени 2 реда и са изтрити 10 реда
  1. 2 10
      OpenshotService/openshot_video_generator.py

+ 2 - 10
OpenshotService/openshot_video_generator.py

@@ -120,10 +120,6 @@ def make_dir(name_hash):
         os.mkdir(dir_sound+name_hash)
     except FileExistsError:
         print("~~~~~~Warning~~~~~~~~~Directory " , dir_sound+name_hash ,  " already exists")
-    try:
-        os.mkdir(dir_video+name_hash)
-    except FileExistsError:
-        print("~~~~~~Warning~~~~~~~~~Directory " , dir_video+name_hash ,  " already exists")
     try:
         os.mkdir(dir_anchor+name_hash)
     except FileExistsError:
@@ -254,10 +250,7 @@ def generate_subtitle_image(name_hash,text_content):
             img_list[idx]+=[{"count":len(sub),"path":sv_path}]
     return img_list
 
-async def sendProgress(progress,client_id):
-    ws = create_connection("ws://www.choozmo.com:8888/progress/"+client_id)
-    ws.send(str(progress))
-    ws.close()
+
 
 def anchor_video_v2(name_hash,name,text_content, image_urls,avatar,client_id):
     print(os.getcwd())
@@ -265,7 +258,6 @@ def anchor_video_v2(name_hash,name,text_content, image_urls,avatar,client_id):
     file_prepare_v2(name, name_hash, text_content,image_urls)
     sub_list=generate_subtitle_image(name_hash,text_content)
     
-    progress_per_video = int(40/len(text_content))
     for fname in range(len(text_content)):
         call_anchor(name_hash+"/"+str(fname),avatar)
         print('step finish')
@@ -293,7 +285,7 @@ def anchor_video_v2(name_hash,name,text_content, image_urls,avatar,client_id):
     head_duration = LOGO_OP.info.duration
     bg_head.Close()
     LOGO_OP.Close()
-    progress += 10
+
     
     clip_duration=0
     photo_clip_list = [None]*len(text_content)