Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jan 22, 2024
1 parent 7e59802 commit f28b528
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/PlayLists/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
$rows = Playlists_schedules::getAllExecuted();
foreach ($rows as $key => $value) {
if(in_array($value['id'], $processed)){
_error_log("Playlist rebroadcast line ".__LINE__);
continue;
}
$processed[] = $value['id'];
$ps = Playlists_schedules::getPlaying($value['id']);
if ($value['finish_datetime'] < time()) {
_error_log("Playlist rebroadcast line ".__LINE__);
PlayLists::setScheduleStatus($key, Playlists_schedules::STATUS_COMPLETE);
continue;
}
Expand All @@ -46,10 +48,12 @@
$rows = Playlists_schedules::getAllActive();
foreach ($rows as $key => $value) {
if(in_array($value['id'], $processed)){
_error_log("Playlist rebroadcast line ".__LINE__);
continue;
}
$processed[] = $value['id'];
if ($value['start_datetime'] > time()) {
_error_log("Playlist rebroadcast line ".__LINE__);
continue;
}
$ps = Playlists_schedules::getPlaying($value['id']);
Expand Down

0 comments on commit f28b528

Please sign in to comment.