From: Daniel Karbach Date: Thu, 24 Jul 2025 16:49:43 +0000 (+0200) Subject: more uniqueness in alttprfr sync X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;h=72c9b64bcf8ad959c0cc6908f8d19dbfc13cef58;p=alttp.git more uniqueness in alttprfr sync --- diff --git a/app/Console/Commands/SyncAlttprFr.php b/app/Console/Commands/SyncAlttprFr.php index 0332f3b..99b60e1 100644 --- a/app/Console/Commands/SyncAlttprFr.php +++ b/app/Console/Commands/SyncAlttprFr.php @@ -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;