Jeffgold commited on
Commit
85260c7
·
1 Parent(s): e98f21f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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?https://s3-us-east-1.amazonaws.com/{AWS_S3_BUCKET}/{input_filename}/{res}/{line.strip()}') if line.endswith('.ts\n') else line for line in content]
 
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):