Skip to content

Commit

Permalink
Add extra sanitation for segment name in json
Browse files Browse the repository at this point in the history
  • Loading branch information
dvingerh committed Sep 4, 2020
1 parent 82ff449 commit 25db084
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyinstalive/assembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def assemble(user_called=True, retry_with_zero_m4v=False):
logger.info("Assembling video segment files from specified folder: {}".format(ass_segment_dir))

for segment in all_segments:
segment = re.sub('\?.*$', '', segment)
if not os.path.isfile(segment.replace('.m4v', '.m4a')):
logger.warn('Audio segment not found: {0!s}'.format(segment.replace('.m4v', '.m4a')))
continue
Expand Down
4 changes: 2 additions & 2 deletions pyinstalive/dlfuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ def merge_segments():
logger.info('Merging downloaded files into video.')
pil.broadcast_downloader.stitch(live_mp4_file, cleartempfiles=pil.clear_temp_files)
logger.info('Successfully merged downloaded files into video.')
if pil.clear_temp_files:
helpers.remove_temp_folder()
else:
logger.binfo("Merging of downloaded files has been disabled.")
logger.binfo("Use --assemble command to manually merge downloaded segments.")
if pil.clear_temp_files:
helpers.remove_temp_folder()
helpers.remove_lock()
except ValueError as e:
logger.separator()
Expand Down

0 comments on commit 25db084

Please sign in to comment.