add netflix title
This commit is contained in:
@@ -66,6 +66,7 @@ class FlixInfo {
|
||||
const netflixOverview = ($($('[name="description"]')).attr('content'));
|
||||
const netflixPoster = ($($('[class="img lazyload poster"]')).attr('data-src'));
|
||||
let tmdbURL
|
||||
let title
|
||||
|
||||
if (theMovieDbLanguage) {
|
||||
|
||||
@@ -78,7 +79,7 @@ class FlixInfo {
|
||||
else {
|
||||
const findTitle = ($($('[property="og:title"]')).attr('content'));
|
||||
const splitString = findTitle.split("- Netflix");
|
||||
const title = splitString[0].split("(")[0].trim();
|
||||
title = splitString[0].split("(")[0].trim();
|
||||
const year = splitString[0].split("(")[1].split(")")[0].trim();
|
||||
// create (find) tmdb api url
|
||||
tmdbURL = theMovieDbURL + 'search/' + type + '?api_key=' + tmdbApiKey + '&language=' + theMovieDbLanguage + '&query=' + title + '&first_air_date_year=' + year;
|
||||
@@ -146,6 +147,7 @@ class FlixInfo {
|
||||
} else {
|
||||
getDetailResult.netflix_overview = netflixOverview;
|
||||
getDetailResult.netflix_poster = netflixPoster;
|
||||
getDetailResult.netflix_title = title;
|
||||
returnResult = { result: 1, error: 0, watch: type, details: getDetailResult, credits: getCreditsResult, images: getImagesResult, trailers: getTrailersResult };
|
||||
resolve(returnResult);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user