From 17e0640ad2b24eb6fc865982445c166263b0c951 Mon Sep 17 00:00:00 2001 From: Roardom Date: Sun, 20 Oct 2024 13:49:49 +0000 Subject: [PATCH] fix: meilisearch search for collection id Requires reimporting torrents into meilisearch. --- app/Models/Torrent.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Models/Torrent.php b/app/Models/Torrent.php index 903f8683a0..6bca8f9bf9 100644 --- a/app/Models/Torrent.php +++ b/app/Models/Torrent.php @@ -314,8 +314,10 @@ protected function casts(): array WHERE genre_movie.movie_id = torrents.tmdb ) ), - 'collection_id', ( - SELECT collection_movie.collection_id + 'collection', ( + SELECT JSON_OBJECT( + 'id', collection_movie.collection_id + ) FROM collection_movie WHERE movies.id = collection_movie.movie_id LIMIT 1