This commit is contained in:
salam committed 2026-08-27 12:35:36 +02:00
1 parent 4887c72e89
commit cacc5b4047
5 files changed
+27 -9

No files matched your search

+3 -3
View File
@@ -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
@@ -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':
@@ -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);
}
@@ -31,6 +31,7 @@ class SofaScoreTaskForm
'daily' => '<span class="text-green-600">Daily</span>',
'date' => '<span class="text-blue-600">Grap a date</span>',
'range' => '<span class="text-amber-600">Grap a date range</span>',
'excel' => '<span class="text-rose-600">Excel</span>',
]),
DatePicker::make('day_from')
->required()
+13
View File
@@ -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');