]> git.localhorst.tv Git - alttp.git/commitdiff
more uniqueness in alttprfr sync
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 24 Jul 2025 16:49:43 +0000 (18:49 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Thu, 24 Jul 2025 16:49:43 +0000 (18:49 +0200)
app/Console/Commands/SyncAlttprFr.php

index 0332f3b47814bedeb062091c088c8779eea4a579..99b60e1bd905f15b18cc0b74c2d8063577fcb88c 100644 (file)
@@ -81,11 +81,11 @@ class SyncAlttprFr extends Command {
        }
 
        private function syncSchedule(Event $event, $row) {
-               $ext_id = 'alttprfr:'.$event->id.':'.$row[1];
-               $episode = Episode::query()->firstWhere('ext_id', '=', $ext_id);
                if (preg_match('/^(.*) vs (.*) - (.*)$/', $row[0], $matches) === false) {
                        return;
                }
+               $ext_id = 'alttprfr:'.$event->id.':'.$row[1].':'.$matches[1].':'.$matches[2];
+               $episode = Episode::query()->firstWhere('ext_id', '=', $ext_id);
                if (!$episode) {
                        $episode = new Episode();
                        $episode->ext_id = $ext_id;