diff --git a/seasoned_api/src/plex/plex.js b/seasoned_api/src/plex/plex.js index 0fc8a03..867e0e6 100644 --- a/seasoned_api/src/plex/plex.js +++ b/seasoned_api/src/plex/plex.js @@ -139,7 +139,6 @@ class Plex { } return new Promise((resolve, reject) => this.cache.get(cacheKey) - .then(resolve) // if found in cache resolve .catch(() => fetch(url, options)) // else fetch fresh data .then(successfullResponse) .then(results => this.cache.set(cacheKey, results, 21600)) @@ -157,7 +156,6 @@ class Plex { mapResults(response) { if (response == null || response.MediaContainer == null || response.MediaContainer.Hub == null) { - console.log('No results to map in:', response) return [] } @@ -173,7 +171,6 @@ class Plex { } }) .filter(result => result !== undefined) -// .flat() } } diff --git a/seasoned_api/src/tmdb/tmdb.js b/seasoned_api/src/tmdb/tmdb.js index 4f03dcc..b55dc64 100644 --- a/seasoned_api/src/tmdb/tmdb.js +++ b/seasoned_api/src/tmdb/tmdb.js @@ -3,7 +3,6 @@ const RedisCache = require('src/cache/redis') const redisCache = new RedisCache() const { Movie, Show, Person, Credits, ReleaseDates } = require('src/tmdb/types'); -// const { tmdbInfo } = require('src/tmdb/types') const tmdbErrorResponse = (error, typeString=undefined) => { if (error.status === 404) { @@ -225,8 +224,6 @@ class TMDB { * @returns {Promise} dict with tmdb results, mapped as movie/show objects. */ mapResults(response, type=undefined) { - // console.log(response.results) - // response.results.map(te => console.table(te)) let results = response.results.map(result => { if (type === 'movie' || result.media_type === 'movie') { diff --git a/seasoned_api/src/tmdb/types.js b/seasoned_api/src/tmdb/types.js index 7bbd2b0..0c7ae23 100644 --- a/seasoned_api/src/tmdb/types.js +++ b/seasoned_api/src/tmdb/types.js @@ -1,7 +1,7 @@ -import Movie from './types/movie.js' -import Show from './types/show.js' -import Person from './types/person.js' -import Credits from './types/credits.js' -import ReleaseDates from './types/releaseDates.js' +const Movie = require('./types/movie.js') +const Show = require('./types/show.js') +const Person = require('./types/person.js') +const Credits = require('./types/credits.js') +const ReleaseDates = require('./types/releaseDates.js') module.exports = { Movie, Show, Person, Credits, ReleaseDates }