Remove hash from result to save bandwidth

This commit is contained in:
Ajay 2022-12-30 15:07:59 -05:00
parent cc24a4902f
commit 2a7083b9ef
2 changed files with 0 additions and 4 deletions

View file

@ -81,7 +81,6 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi
const dbResult: Record<VideoID, BrandingHashDBResult> = {};
const initResult = (submission: BrandingDBSubmission) => {
dbResult[submission.videoID] = dbResult[submission.videoID] || {
hash: submission.hashedVideoID,
branding: {
titles: [],
thumbnails: []
@ -110,7 +109,6 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi
await Promise.all(Object.keys(branding).map(async (key) => {
const castedKey = key as VideoID;
processedResult[castedKey] = {
hash: branding[castedKey].hash,
branding: await filterAndSortBranding(branding[castedKey].branding.titles, branding[castedKey].branding.thumbnails, ip, cache)
};
}));

View file

@ -45,7 +45,6 @@ export interface BrandingResult {
}
export interface BrandingHashDBResult {
hash: VideoIDHash;
branding: {
titles: TitleDBResult[],
thumbnails: ThumbnailDBResult[]
@ -53,6 +52,5 @@ export interface BrandingHashDBResult {
}
export interface BrandingHashResult {
hash: VideoIDHash;
branding: BrandingResult;
}