Matched is set to false if exists_in_plex is undefined (not a part of
the response body). nesteDataToString is simplified in the way it parses its input data. getMovie uses optional second parameter check_existance to check if the file exists in plex.
This commit is contained in:
		| @@ -151,7 +151,7 @@ export default { | |||||||
|       this.title = movie.title |       this.title = movie.title | ||||||
|       this.poster = movie.poster |       this.poster = movie.poster | ||||||
|       this.backdrop = movie.backdrop |       this.backdrop = movie.backdrop | ||||||
|       this.matched = movie.existsInPlex |       this.matched = movie.exists_in_plex || false | ||||||
|       this.checkIfRequested(movie) |       this.checkIfRequested(movie) | ||||||
|         .then(status => this.requested = status) |         .then(status => this.requested = status) | ||||||
|  |  | ||||||
| @@ -161,9 +161,7 @@ export default { | |||||||
|       return await getRequestStatus(movie.id, movie.type) |       return await getRequestStatus(movie.id, movie.type) | ||||||
|     }, |     }, | ||||||
|     nestedDataToString(data) { |     nestedDataToString(data) { | ||||||
|       let nestedArray = [] |       return data.join(', ') | ||||||
|       data.forEach(item => nestedArray.push(item)); |  | ||||||
|       return nestedArray.join(', '); |  | ||||||
|     }, |     }, | ||||||
|     sendRequest(){ |     sendRequest(){ | ||||||
|       request(this.id, this.type, storage.token) |       request(this.id, this.type, storage.token) | ||||||
| @@ -200,7 +198,7 @@ export default { | |||||||
|     this.prevDocumentTitle = store.getters['documentTitle/title'] |     this.prevDocumentTitle = store.getters['documentTitle/title'] | ||||||
|  |  | ||||||
|     if (this.type === 'movie') { |     if (this.type === 'movie') { | ||||||
|       getMovie(this.id) |       getMovie(this.id, true) | ||||||
|         .then(this.parseResponse) |         .then(this.parseResponse) | ||||||
|         .catch(error => { |         .catch(error => { | ||||||
|           this.$router.push({ name: '404' }); |           this.$router.push({ name: '404' }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user