|
@@ -39,7 +39,21 @@ class Cron
|
|
|
if ($data) {
|
|
|
$time = time();
|
|
|
foreach ($data as $k => $v) {
|
|
|
- if ($v[$video['stream_id']] > 0 && $v[$video['sdate']] > 0 && $v[$video['edate']] > 0 && $time >= $v[$video['edate']]) {
|
|
|
+ $state = false;
|
|
|
+ if ($v[$video['url_m3u8']]) {
|
|
|
+ $url = explode('/', $v[$video['url_m3u8']]);
|
|
|
+ $index = count($url)-1;
|
|
|
+ $date = explode('-', $url[$index]);
|
|
|
+ if ($date[0] != $v[$video['sdate']]) {
|
|
|
+ $state = true;
|
|
|
+ }
|
|
|
+ if ($date[1] != $v[$video['edate']]) {
|
|
|
+ $state = true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ $state = true;
|
|
|
+ }
|
|
|
+ if ($v[$video['stream_id']] > 0 && $state && $v[$video['sdate']] > 0 && $v[$video['edate']] > 0 && $time >= $v[$video['edate']]) {
|
|
|
$info = Dever::db('live/stream')->one($v[$video['stream_id']]);
|
|
|
$config = Dever::db('live/info')->one($info['live_id']);
|
|
|
$handle = new Handle();
|