extension(Autoembed): Added search

This commit is contained in:
Swakshan
2024-12-20 23:07:54 +05:30
parent 7074eec94a
commit 9f6f9c5a12

View File

@@ -6,7 +6,7 @@ const mangayomiSources = [{
"iconUrl": "https://www.google.com/s2/favicons?sz=64&domain=https://autoembed.cc/", "iconUrl": "https://www.google.com/s2/favicons?sz=64&domain=https://autoembed.cc/",
"typeSource": "multi", "typeSource": "multi",
"isManga": false, "isManga": false,
"version": "0.0.5", "version": "0.0.6",
"dateFormat": "", "dateFormat": "",
"dateFormatLocale": "", "dateFormatLocale": "",
"pkgPath": "" "pkgPath": ""
@@ -59,7 +59,7 @@ 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 hasNextPage = true; var hasNextPage = slug.indexOf("search=") > -1 ? false : true;
return { return {
list: [...popMovie, ...popSeries], list: [...popMovie, ...popSeries],
hasNextPage hasNextPage
@@ -81,7 +81,7 @@ class DefaultExtension extends MProvider {
return await this.getSearchInfo(`tmdb.trending/genre=${trend_window}&skip=${skip}.json`); return await this.getSearchInfo(`tmdb.trending/genre=${trend_window}&skip=${skip}.json`);
} }
async search(query, page, filters) { async search(query, page, filters) {
throw new Error("search not implemented"); return await this.getSearchInfo(`tmdb.popular/search=${query}.json`);
} }
async getDetail(url) { async getDetail(url) {
var parts = url.split("/"); var parts = url.split("/");