]> git.localhorst.tv Git - alttp.git/commitdiff
cabookey cancelled episode
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 19 Jul 2025 11:21:45 +0000 (13:21 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 19 Jul 2025 11:21:45 +0000 (13:21 +0200)
app/Console/Commands/SyncCabookey.php

index afcc28c9b6a93216aef2c3829a72a0e73e774827..fb8121da2bac1149b1841323816d2b84b7832476 100644 (file)
@@ -70,6 +70,13 @@ class SyncCabookey extends Command {
        private function syncSchedule(Event $event, $row) {
                $ext_id = 'cabookey:'.$row[0];
                $episode = Episode::firstWhere('ext_id', '=', $ext_id);
+               if (in_array($ext_id, $this->cancelled)) {
+                       if ($episode) {
+                               $episode->callOff();
+                               $episode->delete();
+                       }
+                       return;
+               }
                if (!$episode) {
                        $episode = new Episode();
                        $episode->ext_id = $ext_id;
@@ -126,4 +133,8 @@ class SyncCabookey extends Command {
                return null;
        }
 
+       private $cancelled = [
+               'cabookey:7/18/2025 2:50:35',
+       ];
+
 }