From 5b46ef237e3444dbb0b8b556ac34c003df723fa4 Mon Sep 17 00:00:00 2001
From: Gubeno <thomas.gubeno@ensiie.fr>
Date: Wed, 24 Oct 2018 19:41:34 +0200
Subject: [PATCH] =?UTF-8?q?Traduction=20des=20titres=20en=20fran=C3=A7ais?=
 =?UTF-8?q?=20+=20ajout=20de=20quelques=20films?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/WebApp/application/views/getMovie.php | 6 +++---
 src/WebApp/assets/js/new_film.js          | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/WebApp/application/views/getMovie.php b/src/WebApp/application/views/getMovie.php
index 8e65698..c39b4b1 100644
--- a/src/WebApp/application/views/getMovie.php
+++ b/src/WebApp/application/views/getMovie.php
@@ -2,11 +2,11 @@
 <?php
 function getMoviebyID($id)
 {
-    $tmdb_url = 'https://api.themoviedb.org/3/movie/' . $id . '?api_key=7ac6810245f15284418f2a15b9b22225';
+    $tmdb_url = 'https://api.themoviedb.org/3/movie/' . $id . '?api_key=7ac6810245f15284418f2a15b9b22225&language=fr-FR';
     $movie_json = file_get_contents($tmdb_url);
     $movie_array = json_decode($movie_json, true);
    
-    $title = $movie_array['original_title'];
+    $title = $movie_array['title'];
 
     return $title;
 
@@ -14,7 +14,7 @@ function getMoviebyID($id)
 
 function getRandomMovie()
 {
-    $input = array(65,500,200,300,600,100,550,115,155,165,175,180,185,215,235,240,275,280,380,415,435,440,475,565,595);
+    $input = array(65,500,200,300,600,100,550,115,155,165,175,180,185,215,235,240,275,280,380,415,435,440,475,565,595,605,620,640,650,680,710,406,313369,11324);
     $random_id = $input[array_rand($input,1)];
     return getMoviebyID($random_id);
 
diff --git a/src/WebApp/assets/js/new_film.js b/src/WebApp/assets/js/new_film.js
index d69c4b0..795a0ec 100644
--- a/src/WebApp/assets/js/new_film.js
+++ b/src/WebApp/assets/js/new_film.js
@@ -1,10 +1,10 @@
 function getMoviebyID($id)
 {
-    $tmdb_url = 'https://api.themoviedb.org/3/movie/' + $id + '?api_key=7ac6810245f15284418f2a15b9b22225';
+    $tmdb_url = 'https://api.themoviedb.org/3/movie/' + $id + '?api_key=7ac6810245f15284418f2a15b9b22225&language=fr-FR';
     $movie_json = file_get_contents($tmdb_url);
     $movie_array = json_decode($movie_json, true);
 
-    $title = $movie_array['original_title'];
+    $title = $movie_array['title'];
 
     return $title;
 
@@ -12,7 +12,7 @@ function getMoviebyID($id)
 
 function getRandomMovie()
 {
-    $input = array(65,500,200,300,600,100,550,115,155,165,175,180,185,215,235,240,275,280,380,415,435,440,475,565,595);
+    $input = array(65,500,200,300,600,100,550,115,155,165,175,180,185,215,235,240,275,280,380,415,435,440,475,565,595,605,620,640,650,680,710,406,313369,11324);
     $random_id = $input[array_rand($input,1)];
     return getMoviebyID($random_id);
 
-- 
GitLab