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
|
||||
shows.db
|
||||
conf/
|
||||
conf/development.json
|
||||
|
||||
# conf/development-prod.json
|
||||
|
||||
@@ -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