]> git.localhorst.tv Git - alttp.git/commitdiff
remove player names from TFL episode title
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 19 Jun 2026 13:25:15 +0000 (15:25 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 19 Jun 2026 13:25:15 +0000 (15:25 +0200)
app/Console/Commands/SyncTFL.php

index 5569b8cdcb484a5d0fb8b3c96b773a2e23d8d9fd..c294740f7afe6257d9666ce25dfe1d98351fab88 100644 (file)
@@ -102,10 +102,11 @@ class SyncTFL extends Command {
                $episode->confirmed = true;
                $episode->save();
 
-               if (!preg_match('/\\| ([^|]+) vs\\. ([^|]+) \\|/', $tflEntry['name'], $matches)) {
+               if (!preg_match('/^(.*) \\| ([^|]+) vs\\. ([^|]+) \\| (.*)$/', $tflEntry['name'], $matches)) {
                        return;
                }
-               $tflPlayers = [$matches[1], $matches[2]];
+               $episode->title = $matches[1].' - '.$matches[4];
+               $tflPlayers = [$matches[2], $matches[3]];
 
                $this->purgePlayers($episode, $tflPlayers);
                foreach ($tflPlayers as $tflPlayer) {