mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-30 16:17:41 +01:00
Update src/backend/metadata/search.ts
Co-authored-by: William Oldham <github@binaryoverload.co.uk>
This commit is contained in:
parent
897d856ba5
commit
5bf7c82b54
1 changed files with 3 additions and 3 deletions
|
@ -24,10 +24,10 @@ export async function searchForMedia(query: MWQuery): Promise<MediaItem[]> {
|
|||
return formatTMDBMetaToMediaItem(formattedResult);
|
||||
});
|
||||
|
||||
const movieWithposters = results.filter((movie) => movie.poster);
|
||||
const movieWithoutposters = results.filter((movie) => !movie.poster);
|
||||
const movieWithPosters = results.filter((movie) => movie.poster);
|
||||
const movieWithoutPosters = results.filter((movie) => !movie.poster);
|
||||
|
||||
const sortedresult = movieWithposters.concat(movieWithoutposters);
|
||||
const sortedresult = movieWithPosters.concat(movieWithoutPosters);
|
||||
|
||||
// cache results for 1 hour
|
||||
cache.set(query, sortedresult, 3600);
|
||||
|
|
Loading…
Reference in a new issue