mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-26 17:11:50 +01:00
Change results position
This commit is contained in:
parent
86feacbfa2
commit
99fbfd9848
@ -24,8 +24,6 @@ export async function searchForMedia(query: MWQuery): Promise<MediaItem[]> {
|
|||||||
return formatTMDBMetaToMediaItem(formattedResult);
|
return formatTMDBMetaToMediaItem(formattedResult);
|
||||||
});
|
});
|
||||||
|
|
||||||
cache.set(query, results, 3600);
|
|
||||||
|
|
||||||
results.sort((a, b) => {
|
results.sort((a, b) => {
|
||||||
if (a.poster === undefined) {
|
if (a.poster === undefined) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -35,6 +33,8 @@ export async function searchForMedia(query: MWQuery): Promise<MediaItem[]> {
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
cache.set(query, results, 3600);
|
||||||
// cache results for 1 hour
|
// cache results for 1 hour
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user