Skip to content

Commit 5ffb783

Browse files
committed
fix: search by tmdb 0 to find missing tmdbs
Not sure what was going through my mind when deciding the query for this the first time around, it didn't exactly do anything useful. Now it's back to doing what it used to do before the switch to nulls instead of 0s for metadata ids: finding torrents without any associated tmdb.
1 parent 6f994fd commit 5ffb783

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/DTO/TorrentSearchFiltersDTO.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -536,10 +536,12 @@ final public function toMeilisearchFilter(): array
536536
if ($this->tmdbId !== null) {
537537
if ($this->tmdbId === 0) {
538538
$filters[] = [
539-
'tmdb_movie_id IS NULL AND tmdb_tv_id IS NOT NULL',
540-
'tmdb_tv_id IS NULL AND tmdb_movie_id IS NOT NULL',
541-
'tmdb_movie_id = 0 AND tmdb_tv_id != 0',
542-
'tmdb_tv_id = 0 AND tmdb_movie_id != 0',
539+
'tmdb_movie_id IS NULL',
540+
'tmdb_movie_id = 0',
541+
];
542+
$filters[] = [
543+
'tmdb_tv_id IS NULL',
544+
'tmdb_tv_id = 0',
543545
];
544546
} else {
545547
$filters[] = [

0 commit comments

Comments
 (0)