This commit is contained in:
Wise Colt
2020-04-26 15:31:30 +03:00
parent e9bd9584c3
commit 8fec780a68

View File

@@ -63,8 +63,6 @@ class FlixInfo {
const findImdb = ($($('[class="mb-2 rating-container"]')).attr()); const findImdb = ($($('[class="mb-2 rating-container"]')).attr());
const type = netflixLocation == 'tr' ? (body.search("Sezon") > 0 ? 'tv' : 'movie') : (body.search("Season") > 0 ? 'tv' : 'movie'); const type = netflixLocation == 'tr' ? (body.search("Sezon") > 0 ? 'tv' : 'movie') : (body.search("Season") > 0 ? 'tv' : 'movie');
console.log(type);
const netflixOverview = ($($('[name="description"]')).attr('content')); const netflixOverview = ($($('[name="description"]')).attr('content'));
const netflixPoster = ($($('[class="img lazyload poster"]')).attr('data-src')); const netflixPoster = ($($('[class="img lazyload poster"]')).attr('data-src'));
let tmdbURL let tmdbURL
@@ -86,10 +84,6 @@ class FlixInfo {
tmdbURL = theMovieDbURL + 'search/' + type + '?api_key=' + tmdbApiKey + '&language=' + theMovieDbLanguage + '&query=' + title + '&first_air_date_year=' + year; tmdbURL = theMovieDbURL + 'search/' + type + '?api_key=' + tmdbApiKey + '&language=' + theMovieDbLanguage + '&query=' + title + '&first_air_date_year=' + year;
} }
console.log(tmdbURL);
request(encodeURI(tmdbURL), (err, resultBody, body) => { request(encodeURI(tmdbURL), (err, resultBody, body) => {
// Api find all result (for get tmdb id) // Api find all result (for get tmdb id)
@@ -111,11 +105,10 @@ class FlixInfo {
let result; let result;
if(findImdb){ if (findImdb) {
result = type == 'movie' ? getJson.movie_results : getJson.tv_results result = type == 'movie' ? getJson.movie_results : getJson.tv_results
console.log(result);
} else {
}else{
result = getJson.results result = getJson.results
} }