]> git.localhorst.tv Git - alttp.git/commitdiff
fix initial match time
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 26 Feb 2023 19:15:10 +0000 (20:15 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 26 Feb 2023 19:15:10 +0000 (20:15 +0100)
app/Console/Commands/SyncSpeedGaming.php

index 75f3cbcda567f034529619352f969bf820b9a569..3f2058f857136a986cd05c717b5356176fdb134b 100644 (file)
@@ -104,7 +104,7 @@ class SyncSpeedGaming extends Command {
                $episode->event()->associate($event);
                $episode->title = $sgEntry['match1']['title'];
                $start = Carbon::createFromFormat('Y-m-d\TH:i:sP', $sgEntry['when']);
-               if ($start->ne($episode->start)) {
+               if (!$episode->start || $start->ne($episode->start)) {
                        $episode->start = $start;
                }
                $episode->estimate = $sgEntry['length'] * 60;