You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 1, 2021. It is now read-only.
Improved IMDB Code. Results should load much faster. Overhauled mapping api and database structure.
IMDB Code is also in house now, meaning no more python shenanigans.
Mapping API, Database structure and returned JSON is now much more sensible. A lot of request validation was also added in preparation of Radarr integration.
Fixed exception when no movie is currently added to your Radarr library.
$movies = DB::select("SELECT sub.* FROM (SELECT m.*, r.release_date as physical_release, r.note as physical_release_note, r.type from `movies` m LEFT JOIN release_dates r ON r.tmdbid = m.id AND r.type in (4,5,6) where m.`imdb_id` in ('$idStr') ORDER BY r.release_date) sub GROUP BY sub.id ORDER BY FIELD(imdb_id, '$idStr');");
@@ -52,7 +52,12 @@ public function recommendations(Request $request) {
52
52
{
53
53
$ignoredIds = ",".$ignoredIds;
54
54
}
55
-
$movies_db = DB::select("SELECT mo.id, mo.popularity, mo.imdb_id, mo.title, mo.overview, mo.vote_average, mo.vote_count, mo.tagline, mo.poster_path, mo.release_date, mo.release_year, mo.trailer_key, mo.trailer_site, mo.backdrop_path, mo.homepage, mo.runtime, mo.countO FROM ( SELECT m.*, r.recommended_id, r.tmdbid, r.id as rid, count(m.id) as countO FROM movies m, recommendations r WHERE m.id = r.recommended_id AND r.tmdbid in ($ids) AND r.recommended_id not in ($ids$ignoredIds) GROUP BY m.id ) as mo;");
55
+
56
+
if ($ids == "" || $ids == null)
57
+
{
58
+
abort(422, "Please add some movies before using our recommendation engine :)");
59
+
}
60
+
$movies_db = DB::select("SELECT mo.id, mo.popularity, mo.imdb_id, mo.title, mo.overview, mo.vote_average, mo.vote_count, mo.tagline, mo.poster_path, mo.release_date, mo.release_year, mo.trailer_key, mo.trailer_site, mo.backdrop_path, mo.homepage, mo.runtime, mo.countO, mo.genres, mo.runtime, mo.adult FROM ( SELECT m.*, r.recommended_id, r.tmdbid, r.id as rid, count(m.id) as countO FROM movies m, recommendations r WHERE m.id = r.recommended_id AND r.tmdbid in ($ids) AND r.recommended_id not in ($ids$ignoredIds) AND m.adult = 0 GROUP BY m.id ) as mo;");
0 commit comments