mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 07:27:01 +03:00
Send video duration if known
This commit is contained in:
@@ -189,7 +189,8 @@ async function filterAndSortBranding(videoID: VideoID, dbTitles: TitleDBResult[]
|
||||
return {
|
||||
titles,
|
||||
thumbnails,
|
||||
randomTime: findRandomTime(videoID, dbSegments)
|
||||
randomTime: findRandomTime(videoID, dbSegments),
|
||||
videoDuration: dbSegments[0]?.videoDuration ?? null
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ export interface ThumbnailResult {
|
||||
export interface BrandingResult {
|
||||
titles: TitleResult[],
|
||||
thumbnails: ThumbnailResult[],
|
||||
randomTime: number
|
||||
randomTime: number,
|
||||
videoDuration: number | null
|
||||
}
|
||||
|
||||
export interface BrandingHashDBResult {
|
||||
|
||||
Reference in New Issue
Block a user