]> git.localhorst.tv Git - alttp.git/commitdiff
sync secondary SG match if available
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 11 Sep 2025 19:35:43 +0000 (21:35 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 11 Sep 2025 19:35:43 +0000 (21:35 +0200)
app/Console/Commands/SyncSpeedGaming.php

index 2175d737f50d2cba7634cb1644f6ee7e89388d2c..c2a02bde4c80013f376d7014fc71fb381114bf8a 100644 (file)
@@ -182,6 +182,15 @@ class SyncSpeedGaming extends Command {
                                $this->error('error syncing player '.$sgPlayer['id'].': '.$e->getMessage());
                        }
                }
+               if (isset($sgEntry['match2'])) {
+                       foreach ($sgEntry['match2']['players'] as $sgPlayer) {
+                               try {
+                                       $this->syncPlayer($episode, $sgPlayer);
+                               } catch (\Exception $e) {
+                                       $this->error('error syncing player '.$sgPlayer['id'].': '.$e->getMessage());
+                               }
+                       }
+               }
        }
 
        private function purgeChannels(Episode $episode, $sgEntry) {