]> git.localhorst.tv Git - alttp.git/commitdiff
fall back to any SG channel on lang not found
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 21 Feb 2023 15:20:14 +0000 (16:20 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 21 Feb 2023 15:20:14 +0000 (16:20 +0100)
app/Console/Commands/SyncSpeedGaming.php

index ce8b10c4a7e4faf5fbacd86f58ca9b3d5016c9c2..c2fa36820af063ed59cc6f62482f4e2e129ae49e 100644 (file)
@@ -283,6 +283,9 @@ class SyncSpeedGaming extends Command {
                if ($channel) {
                        return $channel;
                }
+               return $episode->channels()
+                 ->where('ext_id', 'LIKE', 'sg:%')
+                 ->first();
        }
 
        private function getUserBySGPlayer($player) {