Browse Source

不要乱int

kuma 2 years ago
parent
commit
be8e388eaf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ytbchat2ass.py

+ 1 - 1
ytbchat2ass.py

@@ -52,7 +52,7 @@ Comment: 0,00:00:00.0,00:00:00.0,Danmaku,标题,0,0,0,,'+title+'\n'
     f = open(code+'.ass', 'w', encoding='utf-8-sig')
     f.write(head)
     for message in chat:
-        vpos = message['time_in_seconds'] - int(delay)
+        vpos = message['time_in_seconds'] - float(delay)
         if vpos > 0:
             vpos_end = vpos+8  # 普通弹幕的时长,默认8秒
         else: