Also check the items source for name or title to find out if the response item came from movie or show index

This commit is contained in:
2019-10-23 00:49:38 +02:00
parent 2b3955060f
commit 1c0799a30a

View File

@@ -108,17 +108,17 @@ export default {
this.elasticSearchResults = data.map(item => {
const index = item._index.slice(0, -1)
if (index === 'movie') {
if (index === 'movie' || item._source.original_title) {
return {
name: item._source.original_title,
id: item._source.id,
type: index
type: 'movie'
}
} else if (index === 'show') {
} else if (index === 'show' || item._source.original_name) {
return {
name: item._source.original_name,
id: item._source.id,
type: index
type: 'show'
}
}
})