chore: cleanup

This commit is contained in:
Adrian Castro
2024-02-04 17:38:57 +01:00
parent 1b9fbb4120
commit ef78cc3447

View File

@@ -56,7 +56,7 @@ async function fetchSearchResults(query: string): Promise<ItemData[]> {
title: result.title, title: result.title,
posterUrl: getMediaPoster(result.poster_path), posterUrl: getMediaPoster(result.poster_path),
year: new Date(result.release_date).getFullYear(), year: new Date(result.release_date).getFullYear(),
type: result.media_type as "movie", type: result.media_type,
}; };
case "tv": case "tv":
return { return {
@@ -64,7 +64,7 @@ async function fetchSearchResults(query: string): Promise<ItemData[]> {
title: result.name, title: result.name,
posterUrl: getMediaPoster(result.poster_path), posterUrl: getMediaPoster(result.poster_path),
year: new Date(result.first_air_date).getFullYear(), year: new Date(result.first_air_date).getFullYear(),
type: result.media_type as "tv", type: result.media_type,
}; };
default: default:
return undefined; return undefined;