From: Daniel Karbach Date: Fri, 7 Jun 2024 22:13:13 +0000 (+0200) Subject: add up to 4 player support for zsr sync X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=5df7f3ed455c56370b3c4b690b0ca47b183fa829;p=alttp.git add up to 4 player support for zsr sync --- diff --git a/app/Console/Commands/SyncZSR.php b/app/Console/Commands/SyncZSR.php index 65b21c1..b7719e2 100644 --- a/app/Console/Commands/SyncZSR.php +++ b/app/Console/Commands/SyncZSR.php @@ -95,7 +95,20 @@ class SyncZSR extends Command { $end = Carbon::parse($entry['end']['dateTime'])->setTimezone('UTC'); $episode->estimate = $start->diffInSeconds($end); $episode->confirmed = true; - if (preg_match('/^(.*) - (.*?) vs\.? (.*?)$/u', $episode->title, $matches)) { + if (preg_match('/^(.*) - (.*?) vs\.? (.*?) vs\.? (.*?) vs\.? (.*?)$/u', $episode->title, $matches)) { + $episode->title = $matches[1]; + $episode->save(); + $this->syncPlayer($episode, $matches[2]); + $this->syncPlayer($episode, $matches[3]); + $this->syncPlayer($episode, $matches[4]); + $this->syncPlayer($episode, $matches[5]); + } else if (preg_match('/^(.*) - (.*?) vs\.? (.*?) vs\.? (.*?)$/u', $episode->title, $matches)) { + $episode->title = $matches[1]; + $episode->save(); + $this->syncPlayer($episode, $matches[2]); + $this->syncPlayer($episode, $matches[3]); + $this->syncPlayer($episode, $matches[4]); + } else if (preg_match('/^(.*) - (.*?) vs\.? (.*?)$/u', $episode->title, $matches)) { $episode->title = $matches[1]; $episode->save(); $this->syncPlayer($episode, $matches[2]);