From 4f4e515695e80033e15f1b1c9f40f98dc84b6617 Mon Sep 17 00:00:00 2001 From: epugh Date: Wed, 6 May 2020 10:41:46 -0400 Subject: [PATCH] add in the poster_path so we can do thumb:poster_path in Quepid! Prettier! --- indexTmdb.py | 5 ++++ solr_home/tmdb/conf/schema.xml | 47 +++++++++++++++++----------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/indexTmdb.py b/indexTmdb.py index c35e668..265459b 100644 --- a/indexTmdb.py +++ b/indexTmdb.py @@ -11,10 +11,15 @@ def indexableMovies(): if 'release_date' in tmdbMovie and len(tmdbMovie['release_date']) > 0: releaseDate = tmdbMovie['release_date'] + 'T00:00:00Z' + posterPath = None + if 'poster_path' in tmdbMovie and tmdbMovie['poster_path'] != None: + posterPath = 'https://image.tmdb.org/t/p/w185' + tmdbMovie['poster_path'] + yield {'id': movieId, 'title': tmdbMovie['title'], 'overview': tmdbMovie['overview'], 'tagline': tmdbMovie['tagline'], + 'poster_path': posterPath, 'cast_nomv': " ".join([castMember['name'] for castMember in tmdbMovie['cast']]), 'directors': [director['name'] for director in tmdbMovie['directors']], 'cast': [castMember['name'] for castMember in tmdbMovie['cast']], diff --git a/solr_home/tmdb/conf/schema.xml b/solr_home/tmdb/conf/schema.xml index 0708a7a..ef079b0 100644 --- a/solr_home/tmdb/conf/schema.xml +++ b/solr_home/tmdb/conf/schema.xml @@ -16,10 +16,10 @@ limitations under the License. --> - @@ -106,14 +106,14 @@ trailing underscores (e.g. _version_) are reserved. --> - @@ -122,6 +122,7 @@ + @@ -224,11 +225,11 @@ - @@ -324,11 +325,11 @@