mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-30 16:17:41 +01:00
Change results position
This commit is contained in:
parent
86feacbfa2
commit
99fbfd9848
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue