Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -84,9 +84,9 @@ def create_master_playlist(output_paths, input_filename):
|
|
84 |
# read the .m3u8 file and replace relative links with absolute links
|
85 |
with open(path, 'r') as playlist_file:
|
86 |
content = playlist_file.readlines()
|
87 |
-
content = [line.replace('.ts', f'.ts
|
|
|
88 |
f.writelines(content)
|
89 |
-
f.write('\n')
|
90 |
return master_playlist_path
|
91 |
|
92 |
def upload_file_to_s3(file_path, s3_path):
|
|
|
84 |
# read the .m3u8 file and replace relative links with absolute links
|
85 |
with open(path, 'r') as playlist_file:
|
86 |
content = playlist_file.readlines()
|
87 |
+
content = [line.replace('.ts', f'.ts\n') if line.endswith('.ts\n') else line for line in content]
|
88 |
+
content = [f"https://{AWS_S3_BUCKET}.s3.amazonaws.com/{input_filename}/{res}/{line}" if line.endswith('.ts\n') else line for line in content]
|
89 |
f.writelines(content)
|
|
|
90 |
return master_playlist_path
|
91 |
|
92 |
def upload_file_to_s3(file_path, s3_path):
|