Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Jan 16, 2025
1 parent bd07e9a commit fb8eecc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Blacklight/Releases.php
Original file line number Diff line number Diff line change
Expand Up @@ -744,33 +744,33 @@ public function apiTvSearch(array $siteIdArr = [], string $series = '', string $
->where('passwordstatus', $this->showPasswords(true))
->whereIn('categories_id', Category::getCategorySearch($cat, 'tv', true));

if (!empty(array_filter($siteIdArr))) {
if (! empty(array_filter($siteIdArr))) {
$query->whereHas('video', function ($q) use ($siteIdArr, $series, $episode, $airDate) {
foreach ($siteIdArr as $column => $id) {
if ($id > 0) {
$q->orWhere($column, $id);
}
}
if (!empty($series)) {
if (! empty($series)) {
$q->whereHas('episode', function ($q) use ($series, $episode, $airDate) {
$q->where('series', (int)preg_replace('/^s0*/i', '', $series));
if (!empty($episode)) {
$q->where('episode', (int)preg_replace('/^e0*/i', '', $episode));
$q->where('series', (int) preg_replace('/^s0*/i', '', $series));
if (! empty($episode)) {
$q->where('episode', (int) preg_replace('/^e0*/i', '', $episode));
}
if (!empty($airDate)) {
if (! empty($airDate)) {
$q->whereDate('firstaired', $airDate);
}
});
}
});
}

if (!empty($name)) {
if (! empty($name)) {
if (config('nntmux.elasticsearch_enabled') === true) {
$searchResult = $this->elasticSearch->indexSearchTMA($name, $limit);
} else {
$searchResult = $this->manticoreSearch->searchIndexes('releases_rt', $name, ['searchname']);
if (!empty($searchResult)) {
if (! empty($searchResult)) {
$searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
}
}
Expand All @@ -786,7 +786,7 @@ public function apiTvSearch(array $siteIdArr = [], string $series = '', string $
$query->where('postdate', '>', now()->subDays($maxAge));
}

if (!empty($excludedCategories)) {
if (! empty($excludedCategories)) {
$query->whereNotIn('categories_id', $excludedCategories);
}

Expand Down

0 comments on commit fb8eecc

Please sign in to comment.