Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doudian-py
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiquan
doudian-py
Commits
428bb92b
Commit
428bb92b
authored
Jul 21, 2025
by
baiquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(upload): 调整视频时长的判断逻辑
- 将视频时长的判断条件从大于 60 秒改为大于等于 59 秒- 这样可以更准确地处理接近 60 秒的视频,避免因时长问题导致的上传失败
parent
dd7b0757
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
service/upload_video.py
+1
-1
No files found.
service/upload_video.py
View file @
428bb92b
...
...
@@ -703,7 +703,7 @@ def prepare_video_file(task):
download_video
(
task
[
'video_url'
],
file_path
,
headers
=
task
[
'headers'
])
video_duration
=
get_video_duration
(
file_path
)
if
video_duration
>
60
:
if
video_duration
>
=
59
:
logger
.
error
(
"视频时长大于60秒,上传失败"
)
raise
VideoError
(
f
"{file_path} 视频时长大于60秒,上传失败"
)
is_valid
,
actual_ratio
,
best_match
=
check_video_aspect_ratio
(
file_path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment