From 11611b169649cd329bc37eae5110ec6f649926c9 Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 16 Jan 2026 08:31:46 +0100 Subject: [PATCH] wip --- .../Commands/Grapper/Fixtures/FindFixture.php | 6 ++++++ app/Console/Commands/Grapper/Logifuture.php | 2 -- app/Console/Commands/Grapper/Magloo/Fixtures.php | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/Grapper/Fixtures/FindFixture.php b/app/Console/Commands/Grapper/Fixtures/FindFixture.php index 9dae3871..a52f6713 100644 --- a/app/Console/Commands/Grapper/Fixtures/FindFixture.php +++ b/app/Console/Commands/Grapper/Fixtures/FindFixture.php @@ -99,6 +99,12 @@ class FindFixture return; } + if (in_array(Nuh::$options['provider_id'], [5, 6])) { + Mapper::updateOrCreate(['event_id' => $event_id], $event); + + return; + } + /************************************************* * FIND *************************************************/ diff --git a/app/Console/Commands/Grapper/Logifuture.php b/app/Console/Commands/Grapper/Logifuture.php index da7de4cd..7dac3021 100644 --- a/app/Console/Commands/Grapper/Logifuture.php +++ b/app/Console/Commands/Grapper/Logifuture.php @@ -36,8 +36,6 @@ class Logifuture break; } - FindFixture::start(); - $sportmap = Sport::map('logi', 1, [1, 2, 3, 5]); $event_id_collector = []; diff --git a/app/Console/Commands/Grapper/Magloo/Fixtures.php b/app/Console/Commands/Grapper/Magloo/Fixtures.php index 1c4bce9b..c23da7c5 100644 --- a/app/Console/Commands/Grapper/Magloo/Fixtures.php +++ b/app/Console/Commands/Grapper/Magloo/Fixtures.php @@ -20,6 +20,8 @@ class Fixtures FindFixture::start(); + $event_id_collector = []; + $sportmap = Sport::map('magl', 1, [1, 3]); if ($proxy) { @@ -95,8 +97,21 @@ class Fixtures $event['away'] = addslashes($teams[1]); FindFixture::find($event); + + if ($event['id']) { + + $event_id_collector[] = $event['id']; + + EventBookmaker::updateOrCreate([ + 'event_id' => $event['id'], + 'bookmaker_id' => Nuh::$options['bookmaker_id'], + ], ['in_feed' => 1, 'bmoid' => $event['event_id']]); + } } } } + if ($event_id_collector) { + EventBookmaker::whereNotIn('event_id', $event_id_collector)->where('bookmaker_id', Nuh::$options['bookmaker_id'])->update(['in_feed' => 0]); + } } }