forked from tilderadio/archive
add dj exclusion list
This commit is contained in:
parent
b954d0e411
commit
0df120c2bf
1
webhook/exclude-djs.txt
Normal file
1
webhook/exclude-djs.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
alrs
|
|
@ -6,6 +6,7 @@ if ($json["live"]["is_live"]) {
|
||||||
// start recording
|
// start recording
|
||||||
$streamer = $json["live"]["streamer_name"];
|
$streamer = $json["live"]["streamer_name"];
|
||||||
|
|
||||||
|
if (!in_array($streamer, file("exclude-djs.txt")) {
|
||||||
$current_pid = intval(file_get_contents("ffmpeg.pid"));
|
$current_pid = intval(file_get_contents("ffmpeg.pid"));
|
||||||
// posix_kill with 0 signal tells you if the process is running
|
// posix_kill with 0 signal tells you if the process is running
|
||||||
if ($current_pid != "" && posix_kill($current_pid, 0)) die();
|
if ($current_pid != "" && posix_kill($current_pid, 0)) die();
|
||||||
|
@ -24,6 +25,7 @@ if ($json["live"]["is_live"]) {
|
||||||
|
|
||||||
echo $pid;
|
echo $pid;
|
||||||
file_put_contents("ffmpeg.pid", $pid);
|
file_put_contents("ffmpeg.pid", $pid);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// stop recording
|
// stop recording
|
||||||
$pid = file_get_contents("ffmpeg.pid");
|
$pid = file_get_contents("ffmpeg.pid");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user