mirror of
https://github.com/p-stream/p-stream.git
synced 2026-04-19 15:22:04 +00:00
Improve mapping
This commit is contained in:
parent
5b20d910e8
commit
22683c35a1
1 changed files with 6 additions and 8 deletions
|
|
@ -57,16 +57,14 @@ export const gDrivePlayerScraper: MWMediaProvider = {
|
|||
async searchForMedia(query: MWQuery): Promise<MWProviderMediaResult[]> {
|
||||
const searchRes = await fetch(`${CORS_PROXY_URL}https://api.gdriveplayer.us/v1/movie/search?title=${query.searchQuery}`).then((d) => d.json());
|
||||
|
||||
const results: MWProviderMediaResult[] = [];
|
||||
for (const item of searchRes) {
|
||||
results.push({
|
||||
title: item.title,
|
||||
year: item.year,
|
||||
mediaId: item.imdb,
|
||||
});
|
||||
}
|
||||
const results: MWProviderMediaResult[] = searchRes.map((item: any) => ({
|
||||
title: item.title,
|
||||
year: item.year,
|
||||
mediaId: item.imdb,
|
||||
}));
|
||||
|
||||
return results;
|
||||
|
||||
},
|
||||
|
||||
async getStream(media: MWPortableMedia): Promise<MWMediaStream> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue