Commit 8e65e83e authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

use force param for hls

parent 886dbcb5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
__version__ = "0.1.66"
__version__ = "0.1.67"
+2 −1
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ def make_hls(f: Union[models.File, int], force: bool = False):
        f = models.File.objects.get(pk=f)
    if f.should_have_hls:
        hls_destination_dir = hls_destination_dir_from_hash(f.hash)
        if force or not os.path.exists(hls_destination_dir):
            os.makedirs(hls_destination_dir, exist_ok=True)
            ffmpeg_cmd = [
                "ffmpeg",
@@ -281,7 +282,7 @@ def make_hls(f: Union[models.File, int], force: bool = False):
                f"{hls_destination_dir}stream_%v{os.path.sep}playlist.m3u8",
            ]

        subprocess.run(ffmpeg_cmd, check=True)
            subprocess.run(ffmpeg_cmd, check=False)


def make_iiif(f: Union[models.File, int], force: bool = False):