When a element is not found in plex it now still gets a matchedInPlex value, now False when not found.
This commit is contained in:
		
							
								
								
									
										4
									
								
								seasoned_api/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								seasoned_api/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -61,4 +61,6 @@ typings/ | |||||||
| # - - - - -  | # - - - - -  | ||||||
| # My own gitignore files and folders | # My own gitignore files and folders | ||||||
| shows.db | shows.db | ||||||
| conf/ | conf/development.json | ||||||
|  |  | ||||||
|  | # conf/development-prod.json | ||||||
|   | |||||||
| @@ -26,10 +26,15 @@ class PlexRepository { | |||||||
|    compareTmdbToPlex(tmdb, plexResult) { |    compareTmdbToPlex(tmdb, plexResult) { | ||||||
|       return Promise.resolve() |       return Promise.resolve() | ||||||
|          .then(() => { |          .then(() => { | ||||||
|  |             if (plexResult.results.length === 0) { | ||||||
|  |                tmdb.matchedInPlex = false | ||||||
|  |             }  | ||||||
|  |             else { | ||||||
|                plexResult.results.map((plexItem) => { |                plexResult.results.map((plexItem) => { | ||||||
|                   if (tmdb.title === plexItem.title && tmdb.year === plexItem.year) { tmdb.matchedInPlex = true; } |                   if (tmdb.title === plexItem.title && tmdb.year === plexItem.year) { tmdb.matchedInPlex = true; } | ||||||
|                   return tmdb; |                   return tmdb; | ||||||
|                }); |                }); | ||||||
|  |             } | ||||||
|             return tmdb; |             return tmdb; | ||||||
|          }); |          }); | ||||||
|    } |    } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user