diff options
Diffstat (limited to 'client/src/app/+videos/+video-watch')
-rw-r--r-- | client/src/app/+videos/+video-watch/video-watch.component.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index 8034ccebf..540b568ed 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -28,7 +28,7 @@ import { VideoActionsDisplayType, VideoDownloadComponent } from '@app/shared/sha | |||
28 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 28 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
29 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 29 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
30 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' | 30 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' |
31 | import { ServerConfig, ServerErrorCode, UserVideoRateType, VideoCaption, VideoPrivacy, VideoState } from '@shared/models' | 31 | import { PeerTubeProblemDocument, ServerConfig, ServerErrorCode, UserVideoRateType, VideoCaption, VideoPrivacy, VideoState } from '@shared/models' |
32 | import { | 32 | import { |
33 | cleanupVideoWatch, | 33 | cleanupVideoWatch, |
34 | getStoredP2PEnabled, | 34 | getStoredP2PEnabled, |
@@ -431,9 +431,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
431 | .pipe( | 431 | .pipe( |
432 | // If 400, 403 or 404, the video is private or blocked so redirect to 404 | 432 | // If 400, 403 or 404, the video is private or blocked so redirect to 404 |
433 | catchError(err => { | 433 | catchError(err => { |
434 | if (err.body.type === ServerErrorCode.DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS && err.body.originUrl) { | 434 | const errorBody = err.body as PeerTubeProblemDocument |
435 | |||
436 | if (errorBody.code === ServerErrorCode.DOES_NOT_RESPECT_FOLLOW_CONSTRAINTS && errorBody.originUrl) { | ||
435 | const search = window.location.search | 437 | const search = window.location.search |
436 | let originUrl = err.body.originUrl | 438 | let originUrl = errorBody.originUrl |
437 | if (search) originUrl += search | 439 | if (search) originUrl += search |
438 | 440 | ||
439 | this.confirmService.confirm( | 441 | this.confirmService.confirm( |