diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-11 14:56:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-11 14:56:30 +0200 |
commit | 32985a0a779e0e2100a3990b1f1188645e58dfb1 (patch) | |
tree | f96e0166858b10642e2cbf97906d63c57b85ebc1 /client/src | |
parent | a3c997b34cad79fce92c67951a3c8140a9888973 (diff) | |
download | PeerTube-32985a0a779e0e2100a3990b1f1188645e58dfb1.tar.gz PeerTube-32985a0a779e0e2100a3990b1f1188645e58dfb1.tar.zst PeerTube-32985a0a779e0e2100a3990b1f1188645e58dfb1.zip |
Error if importing a torrent with multiple files
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts index 3aae24732..23bd5ef76 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts | |||
@@ -5,7 +5,7 @@ import { scrollToTop } from '@app/helpers' | |||
5 | import { FormValidatorService } from '@app/shared/shared-forms' | 5 | import { FormValidatorService } from '@app/shared/shared-forms' |
6 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' | 6 | import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' |
7 | import { LoadingBarService } from '@ngx-loading-bar/core' | 7 | import { LoadingBarService } from '@ngx-loading-bar/core' |
8 | import { VideoPrivacy, VideoUpdate } from '@shared/models' | 8 | import { ServerErrorCode, VideoPrivacy, VideoUpdate } from '@shared/models' |
9 | import { hydrateFormFromVideo } from '../shared/video-edit-utils' | 9 | import { hydrateFormFromVideo } from '../shared/video-edit-utils' |
10 | import { VideoSend } from './video-send' | 10 | import { VideoSend } from './video-send' |
11 | 11 | ||
@@ -113,7 +113,13 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Af | |||
113 | this.loadingBar.useRef().complete() | 113 | this.loadingBar.useRef().complete() |
114 | this.isImportingVideo = false | 114 | this.isImportingVideo = false |
115 | this.firstStepError.emit() | 115 | this.firstStepError.emit() |
116 | this.notifier.error(err.message) | 116 | |
117 | let message = err.message | ||
118 | if (err.body?.code === ServerErrorCode.INCORRECT_FILES_IN_TORRENT) { | ||
119 | message = $localize`Torrents with only 1 file are supported.` | ||
120 | } | ||
121 | |||
122 | this.notifier.error(message) | ||
117 | } | 123 | } |
118 | ) | 124 | ) |
119 | } | 125 | } |