]> git.localhorst.tv Git - alttp.git/commitdiff
hth multi support
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 1 Feb 2026 12:10:38 +0000 (13:10 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 1 Feb 2026 12:10:38 +0000 (13:10 +0100)
app/Console/Commands/SyncHTH.php

index a75a697c0f74d8356410c31c8ac062efffeafaeb..5f8b4be55ad67ebc0bbbb9d394c3bef265d2e5fd 100644 (file)
@@ -57,7 +57,14 @@ class SyncHTH extends Command {
        }
 
        private function syncEvent(Event $event): void {
-               $hthHandle = substr($event->external_schedule, 4);
+               $hthStr = substr($event->external_schedule, 4);
+               $hthHandles = explode(',', $hthStr);
+               foreach ($hthHandles as $hthHandle) {
+                       $this->syncSubevent($event, $hthHandle);
+               }
+       }
+
+       private function syncSubevent(Event $event, $hthHandle) {
                $parts = explode('/', $hthHandle);
                $hthSeries = $parts[0];
                $hthEvent = $parts[1];