Fix fetching storyboard of password protected video

pull/5870/head
Chocobozzz 2023-06-29 14:22:13 +02:00
parent 9cd06903f4
commit 8ef866071f
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 5 additions and 3 deletions

View File

@ -287,7 +287,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
forkJoin([ forkJoin([
videoAndLiveObs, videoAndLiveObs,
this.videoCaptionService.listCaptions(videoId, videoPassword), this.videoCaptionService.listCaptions(videoId, videoPassword),
this.videoService.getStoryboards(videoId), this.videoService.getStoryboards(videoId, videoPassword),
this.userService.getAnonymousOrLoggedUser() this.userService.getAnonymousOrLoggedUser()
]).subscribe({ ]).subscribe({
next: ([ { video, live, videoFileToken }, captionsResult, storyboards, loggedInOrAnonymousUser ]) => { next: ([ { video, live, videoFileToken }, captionsResult, storyboards, loggedInOrAnonymousUser ]) => {

View File

@ -347,9 +347,11 @@ export class VideoService {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
getStoryboards (videoId: string | number) { getStoryboards (videoId: string | number, videoPassword: string) {
const headers = VideoPasswordService.buildVideoPasswordHeader(videoPassword)
return this.authHttp return this.authHttp
.get<{ storyboards: Storyboard[] }>(VideoService.BASE_VIDEO_URL + '/' + videoId + '/storyboards') .get<{ storyboards: Storyboard[] }>(VideoService.BASE_VIDEO_URL + '/' + videoId + '/storyboards', { headers })
.pipe( .pipe(
map(({ storyboards }) => storyboards), map(({ storyboards }) => storyboards),
catchError(err => { catchError(err => {