Fix/seasoned api search #31

Merged
KevinMidboe merged 2 commits from fix/seasonedApiSearch into master 2017-09-21 14:39:01 +00:00
Showing only changes of commit 743c132aef - Show all commits

View File

@@ -2,7 +2,10 @@ const Movie = require('src/media_classes/movie');
const Show = require('src/media_classes/show');
function convertTmdbToSeasoned(tmdbObject, strictType=undefined) {
const mediaType = strictType || tmdbObject.media_type;
if (strictType === undefined)
var mediaType = tmdbObject.media_type;
else
var mediaType = strictType;
// There are many diff types of content, we only want to look at movies and tv shows
if (mediaType === 'movie') {
@@ -47,4 +50,5 @@ function convertTmdbToSeasoned(tmdbObject, strictType=undefined) {
}
}
module.exports = convertTmdbToSeasoned;
module.exports = convertTmdbToSeasoned;