Removed, commented and added comments
This commit is contained in:
@@ -31,6 +31,7 @@ class PlexRepository {
|
|||||||
|
|
||||||
return rp(options)
|
return rp(options)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
console.log(error)
|
||||||
throw new Error('Unable to search plex.')
|
throw new Error('Unable to search plex.')
|
||||||
})
|
})
|
||||||
.then(result => this.mapResults(result))
|
.then(result => this.mapResults(result))
|
||||||
@@ -44,6 +45,7 @@ class PlexRepository {
|
|||||||
tmdb.matchedInPlex = false
|
tmdb.matchedInPlex = false
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// console.log('plex and tmdb:', plexResult, '\n', tmdb)
|
||||||
plexResult.results.map((plexItem) => {
|
plexResult.results.map((plexItem) => {
|
||||||
if (tmdb.title === plexItem.title && tmdb.year === plexItem.year)
|
if (tmdb.title === plexItem.title && tmdb.year === plexItem.year)
|
||||||
tmdb.matchedInPlex = true;
|
tmdb.matchedInPlex = true;
|
||||||
@@ -57,7 +59,6 @@ class PlexRepository {
|
|||||||
mapResults(response) {
|
mapResults(response) {
|
||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log('plexResponse:', response)
|
|
||||||
if (!response.MediaContainer.hasOwnProperty('Metadata')) return [[], 0];
|
if (!response.MediaContainer.hasOwnProperty('Metadata')) return [[], 0];
|
||||||
|
|
||||||
const mappedResults = response.MediaContainer.Metadata.filter((element) => {
|
const mappedResults = response.MediaContainer.Metadata.filter((element) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user