mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-09-19 20:51:19 +02:00
Fix video branding not being awaited
This commit is contained in:
parent
46c372a764
commit
19ebca86c9
1 changed files with 3 additions and 4 deletions
|
@ -38,10 +38,9 @@ export async function getVideoBranding(videoID: VideoID, service: Service, ip: I
|
|||
{ useReplica: true }
|
||||
) as Promise<ThumbnailDBResult[]>;
|
||||
|
||||
// eslint-disable-next-line require-await
|
||||
const getBranding = async () => ({
|
||||
titles: getTitles(),
|
||||
thumbnails: getThumbnails()
|
||||
titles: await getTitles(),
|
||||
thumbnails: await getThumbnails()
|
||||
});
|
||||
|
||||
const branding = await QueryCacher.get(getBranding, brandingKey(videoID, service));
|
||||
|
@ -50,7 +49,7 @@ export async function getVideoBranding(videoID: VideoID, service: Service, ip: I
|
|||
currentIP: null as Promise<HashedIP> | null
|
||||
};
|
||||
|
||||
return filterAndSortBranding(await branding.titles, await branding.thumbnails, ip, cache);
|
||||
return filterAndSortBranding(branding.titles, branding.thumbnails, ip, cache);
|
||||
}
|
||||
|
||||
export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, service: Service, ip: IPAddress): Promise<Record<VideoID, BrandingResult>> {
|
||||
|
|
Loading…
Reference in a new issue