示例#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))