icytv-liq/liq/utils.liq

25 lines
512 B
Plaintext
Raw Normal View History

2018-12-18 17:38:18 +00:00
# Add a skip function to a source
# when it does not have one
# by default
def add_skip_command(~command,s)
# Register the command:
server.register(
usage=command,
description="Skip the current video in source.",
command,
fun(_) -> begin
print("Skipping...")
source.skip(s)
"OK!"
end
)
end
# Clean-up after video ended
def file_end_cleanup(time, m)
if m["temporary"] == "true" and m["filename"] != "" then
print("rm "^quote(m["filename"]))
system("rm "^quote(m["filename"]))
end
end