wip pp filter

This commit is contained in:
salam committed 2026-10-15 16:29:48 +02:00
1 parent fc1e1b2832
commit 55f31acf2a
23 files changed
+1127 -329

No files matched your search

+13 -9
View File
@@ -141,7 +141,7 @@ trait GrappingSofascore
$daily_way = $this->select_daily_days();
if ($this->ask_settings_download()) {
if ($this->ask_settings_download() == 'yes') {
$this->settings_to_local();
}
@@ -163,7 +163,7 @@ trait GrappingSofascore
/**
* day 1
*/
if (in_array($daily_way, [1, 3])) {
if (in_array($daily_way, [1, 2])) {
$day = Carbon::now()->subDay()->format('Y-m-d');
$this->grapped_files = $this->get_tree($this->data_dir.'/'.$day);
@@ -178,7 +178,7 @@ trait GrappingSofascore
/**
* day 5
*/
if (in_array($daily_way, [2, 3])) {
if (in_array($daily_way, [1, 3])) {
$day = Carbon::now()->subDays(5)->format('Y-m-d');
$this->grapped_files = $this->get_tree($this->data_dir.'/'.$day);
@@ -345,13 +345,17 @@ trait GrappingSofascore
protected function select_daily_days(): string
{
$yesterday = Carbon::yesterday()->format('Y-m-d');
$moredays = Carbon::now()->subDays(5)->format('Y-m-d');
return select(
label: 'What days should be grapped?',
scroll: 10,
default: 1,
options: [
1 => 'Day 1',
2 => 'Day 2',
3 => 'Day 1 & 2',
1 => "$yesterday & $moredays",
2 => $yesterday,
3 => $moredays,
]
);
}
@@ -407,10 +411,10 @@ trait GrappingSofascore
{
return select(
label: 'Download setting?',
default: 0,
default: 'no',
options: [
0 => 'No',
1 => 'Yes',
'no' => 'No',
'yes' => 'Yes',
]
);
}