Skip to content

Commit

Permalink
rename ombiTvOptions to requestTvOptions and add option for includeUs…
Browse files Browse the repository at this point in the history
…erOption

added requestServiceOptions for setting default Request Service
  • Loading branch information
causefx committed Sep 14, 2021
1 parent 54a210b commit fef16f6
Showing 1 changed file with 61 additions and 39 deletions.
100 changes: 61 additions & 39 deletions api/functions/option-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,22 +622,44 @@ public function mediaServerOptions()
);
}

public function ombiTvOptions()
public function requestTvOptions($includeUserOption = false)
{
return array(
array(
$options = [
[
'name' => 'All Seasons',
'value' => 'all'
),
array(
],
[
'name' => 'First Season Only',
'value' => 'first'
),
array(
],
[
'name' => 'Last Season Only',
'value' => 'last'
),
);
],
];
$userOption = [
'name' => 'Let User Select',
'value' => 'user'
];
if ($includeUserOption) {
array_push($options, $userOption);
}
return $options;
}

public function requestServiceOptions()
{
return [
[
'name' => 'Ombi',
'value' => 'ombi'
],
[
'name' => 'Overseerr',
'value' => 'overseerr'
]
];
}

public function limitOptions()
Expand Down Expand Up @@ -899,35 +921,35 @@ public function netdataSizeOptions()

public function timeFormatOptions()
{
return array(
array(
'name' => '6p',
'value' => 'h(:mm)t'
),
array(
'name' => '6:00p',
'value' => 'h:mmt'
),
array(
'name' => '6pm',
'value' => 'h(:mm)a'
),
array(
'name' => '6:00pm',
'value' => 'h:mma'
),
array(
'name' => '6:00',
'value' => 'h:mm'
),
array(
'name' => '18',
'value' => 'H(:mm)'
),
array(
'name' => '18:00',
'value' => 'H:mm'
)
return array(
array(
'name' => '6p',
'value' => 'h(:mm)t'
),
array(
'name' => '6:00p',
'value' => 'h:mmt'
),
array(
'name' => '6pm',
'value' => 'h(:mm)a'
),
array(
'name' => '6:00pm',
'value' => 'h:mma'
),
array(
'name' => '6:00',
'value' => 'h:mm'
),
array(
'name' => '18',
'value' => 'H(:mm)'
),
array(
'name' => '18:00',
'value' => 'H:mm'
)
);
}

Expand Down Expand Up @@ -1086,4 +1108,4 @@ public function calendarDefaultOptions()
)
);
}
}
}

0 comments on commit fef16f6

Please sign in to comment.