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:
@@ -26,10 +26,15 @@ class PlexRepository {
|
||||
compareTmdbToPlex(tmdb, plexResult) {
|
||||
return Promise.resolve()
|
||||
.then(() => {
|
||||
plexResult.results.map((plexItem) => {
|
||||
if (tmdb.title === plexItem.title && tmdb.year === plexItem.year) { tmdb.matchedInPlex = true; }
|
||||
return tmdb;
|
||||
});
|
||||
if (plexResult.results.length === 0) {
|
||||
tmdb.matchedInPlex = false
|
||||
}
|
||||
else {
|
||||
plexResult.results.map((plexItem) => {
|
||||
if (tmdb.title === plexItem.title && tmdb.year === plexItem.year) { tmdb.matchedInPlex = true; }
|
||||
return tmdb;
|
||||
});
|
||||
}
|
||||
return tmdb;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user