예제 #1
0
파일: thumbnail.py 프로젝트: n0emis/cm
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))
예제 #2
0
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))
예제 #3
0
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))