diff --git a/app/Console/Commands/Grap.php b/app/Console/Commands/Grap.php
index 9331ac4e..cdc12c11 100644
--- a/app/Console/Commands/Grap.php
+++ b/app/Console/Commands/Grap.php
@@ -28,7 +28,7 @@ class Grap extends Command
public static string $useragent = '4';
- protected $signature = 'grp {id=0} {day=0} {--folder=} {--d} {--r} {--f} {--R} {--S}';
+ protected $signature = 'grp {id=0} {day=0} {--date=} {--folder=} {--d} {--r} {--f} {--R} {--S}';
public function handle()
{
@@ -78,9 +78,9 @@ class Grap extends Command
break;
case 2:
// DATE
- // SetStorage::set();
+ SetStorage::set(2);
- // Grapper::load(2);
+ Grapper::load(2);
break;
case 3:
// RANGE
diff --git a/app/Console/Commands/Grapper/Sofascore/Helper/LoadDays.php b/app/Console/Commands/Grapper/Sofascore/Helper/LoadDays.php
index e25a8041..6b1498af 100644
--- a/app/Console/Commands/Grapper/Sofascore/Helper/LoadDays.php
+++ b/app/Console/Commands/Grapper/Sofascore/Helper/LoadDays.php
@@ -14,6 +14,7 @@ class LoadDays
{
$debug = Grap::$options['d'] ?? 0;
$restart = Grap::$options['r'] ?? 0;
+ $date = Grap::$options['date'] ?? '';
$dates = [];
@@ -36,7 +37,7 @@ class LoadDays
break;
case 'date':
- $dates[] = ValidateDate::get($task->day_from);
+ $dates[] = ValidateDate::get($date);
break;
case 'range':
diff --git a/app/Console/Commands/Grapper/Sofascore/Helper/SetStorage.php b/app/Console/Commands/Grapper/Sofascore/Helper/SetStorage.php
index c9b03082..9d2e0606 100644
--- a/app/Console/Commands/Grapper/Sofascore/Helper/SetStorage.php
+++ b/app/Console/Commands/Grapper/Sofascore/Helper/SetStorage.php
@@ -17,6 +17,8 @@ class SetStorage
$folder = Grap::$options['folder'] ?? '';
+ $date = Grap::$options['date'] ?? '';
+
$day = Grap::$options['day'] == 0 ? 2 : Grap::$options['day'];
// must be connectet to task for activated ligas
@@ -33,8 +35,9 @@ class SetStorage
Grap::$excel = Grap::$storage . '/' . Grap::$folder;
break;
case 2:
- Grap::$storage = $sofascore_data . $storage_name . '/' . $task->day_from;
- Grap::$zipfile = $sofascore_data . $storage_name . '/' . $task->day_from . '.zip';
+ Grap::$storage = $sofascore_data . $storage_name;
+ Grap::$folder = $date;
+ Grap::$excel = $sofascore_data . $storage_name . '/' . $date;
break;
case 3:
Grap::$storage = $sofascore_data . 'range/' . $storage_name;
@@ -47,8 +50,9 @@ class SetStorage
Grap::$excel = Grap::$storage . '/rosa-' . Carbon::now()->format('Y-m-d');
break;
case 5:
- Grap::$storage = $sofascore_data;
+ Grap::$storage = $sofascore_data . 'excel';
Grap::$folder = $folder;
+ Grap::$excel = $sofascore_data . 'excel/' . $storage_name;
break;
}
} elseif ($folder) {
@@ -57,8 +61,7 @@ class SetStorage
}
if ($debug) {
- Notice::note(Grap::$folder, 'g');
- // Notice::note(Grap::$storage);
+ Notice::note(Grap::$storage, 'g');
if (!$force) {
sleep(4);
}
diff --git a/app/Filament/Clusters/StaticData/Resources/SofaScoreTasks/Schemas/SofaScoreTaskForm.php b/app/Filament/Clusters/StaticData/Resources/SofaScoreTasks/Schemas/SofaScoreTaskForm.php
index 255e0c4b..a7a89400 100644
--- a/app/Filament/Clusters/StaticData/Resources/SofaScoreTasks/Schemas/SofaScoreTaskForm.php
+++ b/app/Filament/Clusters/StaticData/Resources/SofaScoreTasks/Schemas/SofaScoreTaskForm.php
@@ -31,6 +31,7 @@ class SofaScoreTaskForm
'daily' => 'Daily',
'date' => 'Grap a date',
'range' => 'Grap a date range',
+ 'excel' => 'Excel',
]),
DatePicker::make('day_from')
->required()
diff --git a/app/Models/StatistikoPlayer.php b/app/Models/StatistikoPlayer.php
index 4bc5316b..872b27ed 100644
--- a/app/Models/StatistikoPlayer.php
+++ b/app/Models/StatistikoPlayer.php
@@ -80,6 +80,19 @@ class StatistikoPlayer extends Model
'tm_player_id',
];
+ // IDENTIFICAZIONE
+ // match_id
+ // ss_player_id
+
+ // AGGIORNAMENTO
+ // tm_player_id
+ // penaltyshoutout_missed
+ // penaltyshoutout_scored
+ // ingamepenalty_missed,
+ // card_yellow
+ // card_yellowred
+ // card_red
+
public function event()
{
return $this->belongsTo(StatistikoEvent::class, 'match_id', 'match_id');