Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def download_file(url, destination):
|
|
16 |
def get_input_path(video_file, video_url, temp_dir):
|
17 |
"""Returns the path to the video file, downloading it if necessary."""
|
18 |
if video_file is not None:
|
19 |
-
return video_file.name
|
20 |
elif video_url:
|
21 |
file_name = Path(video_url).name
|
22 |
destination = temp_dir / file_name
|
@@ -25,6 +25,7 @@ def get_input_path(video_file, video_url, temp_dir):
|
|
25 |
else:
|
26 |
raise ValueError("No input was provided.")
|
27 |
|
|
|
28 |
def get_output_path(input_path, temp_dir):
|
29 |
"""Returns the path to the output file, creating it if necessary."""
|
30 |
output_path = temp_dir / (input_path.stem + ".m3u8")
|
|
|
16 |
def get_input_path(video_file, video_url, temp_dir):
|
17 |
"""Returns the path to the video file, downloading it if necessary."""
|
18 |
if video_file is not None:
|
19 |
+
return Path(video_file.name)
|
20 |
elif video_url:
|
21 |
file_name = Path(video_url).name
|
22 |
destination = temp_dir / file_name
|
|
|
25 |
else:
|
26 |
raise ValueError("No input was provided.")
|
27 |
|
28 |
+
|
29 |
def get_output_path(input_path, temp_dir):
|
30 |
"""Returns the path to the output file, creating it if necessary."""
|
31 |
output_path = temp_dir / (input_path.stem + ".m3u8")
|