Skip to content

Commit

Permalink
fix: issue with create_hls
Browse files Browse the repository at this point in the history
  • Loading branch information
mgogoulos committed Nov 20, 2024
1 parent 9fc7597 commit 5a1e4f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ admin-shell:
build-frontend:
docker-compose -f docker-compose-dev.yaml exec frontend npm run dist
cp -r frontend/dist/static/* static/
docker-compose -f docker-compose-dev.yaml restart web
docker-compose -f docker-compose-dev.yaml restart web

test:
docker compose -f docker-compose-dev.yaml exec --env TESTING=True -T web pytest

9 changes: 7 additions & 2 deletions files/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,15 @@ def create_hls(friendly_token):

if existing_output_dir:
# override content with -T !
cmd = "cp -rT {0} {1}".format(output_dir, existing_output_dir)
cmd = ["cp", "-rT", output_dir, existing_output_dir]
run_command(cmd)

shutil.rmtree(output_dir)
try:
shutil.rmtree(output_dir)
except: # noqa
# this was breaking in some cases where it was already deleted
# because create_hls was running multiple times
pass
output_dir = existing_output_dir
pp = os.path.join(output_dir, "master.m3u8")
if os.path.exists(pp):
Expand Down

0 comments on commit 5a1e4f2

Please sign in to comment.