Closed Impre-visible closed 2 years ago
there is the code
def home():
print(type(movie))
vu = "\\\\Freebox_Server\\disque dur\\Vidéos\\Vu"
films = os.listdir(vu)
print(films)
for film in films:
search = movie.search(film)
file_title = film.title()
original_file_title = file_title
size = len(file_title)
file_title = file_title[:size - 4]
for res in search:
movie_title = (res.title)
movie_cover_path = (res.poster_path)
cover_full_path = (f"https://image.tmdb.org/t/p/original/{movie_cover_path}")
print("Titre : "+movie_title)
print("Cover :", cover_full_path)
print(file_title)
print('\\\\Freebox_Server\\disque dur\\Vidéos\\Vu\\'+ original_file_title)
print("---------------------------------")
return render_template('index.html', films=films, titre=movie_title, cover=cover_full_path)```
Why on certains movie i have the title and the cover, and on other i have nothing ?