mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 19:01:15 +00:00
extension(Autoembed): optimisation
This commit is contained in:
@@ -59,11 +59,13 @@ class DefaultExtension extends MProvider {
|
|||||||
body = await this.tmdbRequest(`catalog/series/${slug}`);
|
body = await this.tmdbRequest(`catalog/series/${slug}`);
|
||||||
var popSeries = await this.getSearchItems(body);
|
var popSeries = await this.getSearchItems(body);
|
||||||
|
|
||||||
var fullList = [...popMovie, ...popSeries];
|
var fullList = [];
|
||||||
|
|
||||||
var priority = await this.getPreference("pref_content_priority");
|
var priority = await this.getPreference("pref_content_priority");
|
||||||
if (priority === "series") {
|
if (priority === "series") {
|
||||||
fullList = [...popSeries, ...popMovie];
|
fullList = [...popSeries, ...popMovie];
|
||||||
|
} else {
|
||||||
|
fullList = [...popMovie, ...popSeries]
|
||||||
}
|
}
|
||||||
var hasNextPage = slug.indexOf("search=") > -1 ? false : true;
|
var hasNextPage = slug.indexOf("search=") > -1 ? false : true;
|
||||||
return {
|
return {
|
||||||
@@ -96,7 +98,7 @@ class DefaultExtension extends MProvider {
|
|||||||
var body = await this.tmdbRequest(`meta/${media_type}/${id}.json`)
|
var body = await this.tmdbRequest(`meta/${media_type}/${id}.json`)
|
||||||
var result = body.meta;
|
var result = body.meta;
|
||||||
|
|
||||||
var tmdb_id = id.substring(5, )
|
var tmdb_id = id.substring(5,)
|
||||||
media_type = media_type == "series" ? "tv" : media_type;
|
media_type = media_type == "series" ? "tv" : media_type;
|
||||||
|
|
||||||
var dateNow = Date.now().valueOf();
|
var dateNow = Date.now().valueOf();
|
||||||
|
|||||||
Reference in New Issue
Block a user