浏览代码

Double-check media type: must be video

Micrufun 2 年之前
父节点
当前提交
3a67597549
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      files/tasks.py

+ 4 - 0
files/tasks.py

@@ -785,6 +785,10 @@ def video_with_voices(user_or_session, friendly_token=None, voicesUid=None):
     except BaseException:
     except BaseException:
         return False
         return False
 
 
+    # Only video is acceptable.
+    if media.media_type != "video":
+       return False
+
     voices = []
     voices = []
 
 
     for uid in voicesUid:
     for uid in voicesUid: