Pārlūkot izejas kodu

restart line notify

ming 3 gadi atpakaļ
vecāks
revīzija
4e39c20937
1 mainītis faili ar 6 papildinājumiem un 6 dzēšanām
  1. 6 6
      main.py

+ 6 - 6
main.py

@@ -205,7 +205,7 @@ def notify_group(msg):
             "Content-Type": "application/x-www-form-urlencoded"
             "Content-Type": "application/x-www-form-urlencoded"
     }
     }
     params = {"message": msg}   
     params = {"message": msg}   
-    #r = requests.post("https://notify-api.line.me/api/notify",headers=headers, params=params)
+    r = requests.post("https://notify-api.line.me/api/notify",headers=headers, params=params)
     #print(r)
     #print(r)
 
 
 
 
@@ -501,17 +501,17 @@ def anchor_video_v2(name,text_content, image_urls,avatar):
     print('sub image made')
     print('sub image made')
     file_prepare_v2(name, name_hash, text_content,image_urls)
     file_prepare_v2(name, name_hash, text_content,image_urls)
     progress = 10
     progress = 10
-    await manager.broadcast(progress)
+    #await manager.broadcast(progress)
     sub_list=generate_subtitle_image(name_hash,text_content)
     sub_list=generate_subtitle_image(name_hash,text_content)
     progress = 20
     progress = 20
-    await manager.broadcast(progress)
+    #await manager.broadcast(progress)
     
     
     progress_per_video = int(40/len(text_content))
     progress_per_video = int(40/len(text_content))
     for fname in range(len(text_content)):
     for fname in range(len(text_content)):
         call_achor_video_v2(name_hash+"/"+str(fname),avatar)
         call_achor_video_v2(name_hash+"/"+str(fname),avatar)
         progress += progress_per_video
         progress += progress_per_video
         print('step finish')
         print('step finish')
-        await manager.broadcast(progress)
+        #await manager.broadcast(progress)
     print('called............................................')
     print('called............................................')
 
 
     ck=cKey(0,254,0,270)
     ck=cKey(0,254,0,270)
@@ -596,7 +596,7 @@ def anchor_video_v2(name,text_content, image_urls,avatar):
         idx+=1
         idx+=1
 
 
     progress+=10
     progress+=10
-    await manager.broadcast(progress)
+    #await manager.broadcast(progress)
     
     
     LOGO_ED = openshot.FFmpegReader(dir_video+"LOGO_ED.avi")
     LOGO_ED = openshot.FFmpegReader(dir_video+"LOGO_ED.avi")
     LOGO_ED.Open()
     LOGO_ED.Open()
@@ -647,7 +647,7 @@ def anchor_video_v2(name,text_content, image_urls,avatar):
         f=t.GetFrame(n)
         f=t.GetFrame(n)
         w.WriteFrame(f)
         w.WriteFrame(f)
     progress = 100
     progress = 100
-    await manager.broadcast(progress)
+    #await manager.broadcast(progress)
     notify_group(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+name_hash+".mp4")
     notify_group(name+"的影片已經產生完成囉! www.choozmo.com:8168/"+name_hash+".mp4")
     t.Close()
     t.Close()
     w.Close()
     w.Close()