mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 20:00:15 +00:00
handle NA in ffprobe duration extractor
This commit is contained in:
parent
2bf9e9683b
commit
44af78b7e3
@ -169,7 +169,11 @@ class DurationConverter:
|
||||
capture_output=True,
|
||||
check=True,
|
||||
)
|
||||
duration_sec = int(float(duration.stdout.decode().strip()))
|
||||
duration_raw = duration.stdout.decode().strip()
|
||||
if duration_raw == "N/A":
|
||||
return 0
|
||||
|
||||
duration_sec = int(float(duration_raw))
|
||||
return duration_sec
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user