Spaces:
Runtime error
Runtime error
Update src/music/pipeline/url2audio.py
Browse files
src/music/pipeline/url2audio.py
CHANGED
@@ -91,7 +91,14 @@ def url2audio(playlist_path, video_url=None, video=None, playlist_url='', apply_
|
|
91 |
if not os.path.exists(audio_path):
|
92 |
if length > MAX_LEN and verbose: print(' ' * (level + 2) + f'Long video ({int(length/60)} min), will be cut after {int(MAX_LEN/60)} min.')
|
93 |
error_msg += ' Nope. In pipeline video?'
|
94 |
-
kbps =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
error_msg += ' Nope. In dict filling?'
|
96 |
data = dict(title=title, filename=filename, length=length, kbps=kbps, url=video_url, meta=video_meta_data)
|
97 |
error_msg += ' Nope. '
|
|
|
91 |
if not os.path.exists(audio_path):
|
92 |
if length > MAX_LEN and verbose: print(' ' * (level + 2) + f'Long video ({int(length/60)} min), will be cut after {int(MAX_LEN/60)} min.')
|
93 |
error_msg += ' Nope. In pipeline video?'
|
94 |
+
kbps = None
|
95 |
+
for _ in range(5):
|
96 |
+
try:
|
97 |
+
kbps = pipeline_video(video, playlist_path, filename)
|
98 |
+
break
|
99 |
+
except:
|
100 |
+
pass
|
101 |
+
assert kbps is not None
|
102 |
error_msg += ' Nope. In dict filling?'
|
103 |
data = dict(title=title, filename=filename, length=length, kbps=kbps, url=video_url, meta=video_meta_data)
|
104 |
error_msg += ' Nope. '
|