mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
Remove hash from result to save bandwidth
This commit is contained in:
@@ -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)
|
||||
};
|
||||
}));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user