Spaces:
Paused
Paused
Update stream_server.py
Browse files- stream_server.py +1 -1
stream_server.py
CHANGED
@@ -132,7 +132,7 @@ async def add_video(video_name, output_path, audio_duration):
|
|
132 |
total_processed_duration += remaining_duration
|
133 |
|
134 |
# Add #EXT-X-ENDLIST only once after all segments have been added
|
135 |
-
if total_processed_duration ==
|
136 |
with open(output_path, 'a') as m3u8_file:
|
137 |
m3u8_file.write("#EXT-X-ENDLIST\n")
|
138 |
total_processed_duration = 0
|
|
|
132 |
total_processed_duration += remaining_duration
|
133 |
|
134 |
# Add #EXT-X-ENDLIST only once after all segments have been added
|
135 |
+
if total_processed_duration == audio_duration:
|
136 |
with open(output_path, 'a') as m3u8_file:
|
137 |
m3u8_file.write("#EXT-X-ENDLIST\n")
|
138 |
total_processed_duration = 0
|