def cleanup(c): with contextlib.suppress(FileExistsError): os.mkdir(os.path.join(c.thumbnail_write_path, c.stream)) with contextlib.suppress(FileNotFoundError): fanout_utils.remove_glob( os.path.join(c.thumbnail_write_path, "%s/thumb.jpeg" % c.stream))
def cleanup(c): with contextlib.suppress(FileExistsError): os.mkdir(os.path.join(c.dash_write_path, c.stream)) with contextlib.suppress(FileNotFoundError): fanout_utils.remove_glob( os.path.join(c.dash_write_path, "%s/manifest.mpd" % c.stream)) fanout_utils.remove_glob( os.path.join(c.dash_write_path, "%s/*.webm" % c.stream))
def cleanup(c): with contextlib.suppress(FileNotFoundError): fanout_utils.remove_glob(os.path.join( c.hls_write_path, c.stream, "*.ts")) fanout_utils.remove_glob(os.path.join( c.hls_write_path, "%s/*.m3u8" % c.stream)) with contextlib.suppress(OSError): os.rmdir(os.path.join(c.hls_write_path, c.stream))