mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Remove hash from result to save bandwidth
This commit is contained in:
parent
cc24a4902f
commit
2a7083b9ef
2 changed files with 0 additions and 4 deletions
|
@ -81,7 +81,6 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi
|
||||||
const dbResult: Record<VideoID, BrandingHashDBResult> = {};
|
const dbResult: Record<VideoID, BrandingHashDBResult> = {};
|
||||||
const initResult = (submission: BrandingDBSubmission) => {
|
const initResult = (submission: BrandingDBSubmission) => {
|
||||||
dbResult[submission.videoID] = dbResult[submission.videoID] || {
|
dbResult[submission.videoID] = dbResult[submission.videoID] || {
|
||||||
hash: submission.hashedVideoID,
|
|
||||||
branding: {
|
branding: {
|
||||||
titles: [],
|
titles: [],
|
||||||
thumbnails: []
|
thumbnails: []
|
||||||
|
@ -110,7 +109,6 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi
|
||||||
await Promise.all(Object.keys(branding).map(async (key) => {
|
await Promise.all(Object.keys(branding).map(async (key) => {
|
||||||
const castedKey = key as VideoID;
|
const castedKey = key as VideoID;
|
||||||
processedResult[castedKey] = {
|
processedResult[castedKey] = {
|
||||||
hash: branding[castedKey].hash,
|
|
||||||
branding: await filterAndSortBranding(branding[castedKey].branding.titles, branding[castedKey].branding.thumbnails, ip, cache)
|
branding: await filterAndSortBranding(branding[castedKey].branding.titles, branding[castedKey].branding.thumbnails, ip, cache)
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -45,7 +45,6 @@ export interface BrandingResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BrandingHashDBResult {
|
export interface BrandingHashDBResult {
|
||||||
hash: VideoIDHash;
|
|
||||||
branding: {
|
branding: {
|
||||||
titles: TitleDBResult[],
|
titles: TitleDBResult[],
|
||||||
thumbnails: ThumbnailDBResult[]
|
thumbnails: ThumbnailDBResult[]
|
||||||
|
@ -53,6 +52,5 @@ export interface BrandingHashDBResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BrandingHashResult {
|
export interface BrandingHashResult {
|
||||||
hash: VideoIDHash;
|
|
||||||
branding: BrandingResult;
|
branding: BrandingResult;
|
||||||
}
|
}
|
Loading…
Reference in a new issue