mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-25 17:11:51 +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);
|
||||
});
|
||||
|
||||
cache.set(query, results, 3600);
|
||||
|
||||
results.sort((a, b) => {
|
||||
if (a.poster === undefined) {
|
||||
return 1;
|
||||
@ -35,6 +33,8 @@ export async function searchForMedia(query: MWQuery): Promise<MediaItem[]> {
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
cache.set(query, results, 3600);
|
||||
// cache results for 1 hour
|
||||
return results;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user