diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-19 14:23:00 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-19 14:31:05 +0100 |
commit | 419b520ca4434d17f3505013174e195c3a316716 (patch) | |
tree | 24dbf663c4e11e970cb780f96e6eb3efe023b222 /client/src/app/shared/shared-main/video/video-import.service.ts | |
parent | 52435e467a0b30175a10af1dd3ae10d7d564d8ae (diff) | |
download | PeerTube-419b520ca4434d17f3505013174e195c3a316716.tar.gz PeerTube-419b520ca4434d17f3505013174e195c3a316716.tar.zst PeerTube-419b520ca4434d17f3505013174e195c3a316716.zip |
Add ability to cancel & delete video imports
Diffstat (limited to 'client/src/app/shared/shared-main/video/video-import.service.ts')
-rw-r--r-- | client/src/app/shared/shared-main/video/video-import.service.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/video/video-import.service.ts b/client/src/app/shared/shared-main/video/video-import.service.ts index 99df78e3a..0a610ab1f 100644 --- a/client/src/app/shared/shared-main/video/video-import.service.ts +++ b/client/src/app/shared/shared-main/video/video-import.service.ts | |||
@@ -56,6 +56,16 @@ export class VideoImportService { | |||
56 | ) | 56 | ) |
57 | } | 57 | } |
58 | 58 | ||
59 | deleteVideoImport (videoImport: VideoImport) { | ||
60 | return this.authHttp.delete(VideoImportService.BASE_VIDEO_IMPORT_URL + videoImport.id) | ||
61 | .pipe(catchError(err => this.restExtractor.handleError(err))) | ||
62 | } | ||
63 | |||
64 | cancelVideoImport (videoImport: VideoImport) { | ||
65 | return this.authHttp.post(VideoImportService.BASE_VIDEO_IMPORT_URL + videoImport.id + '/cancel', {}) | ||
66 | .pipe(catchError(err => this.restExtractor.handleError(err))) | ||
67 | } | ||
68 | |||
59 | private buildImportVideoObject (video: VideoUpdate): VideoImportCreate { | 69 | private buildImportVideoObject (video: VideoUpdate): VideoImportCreate { |
60 | const language = video.language || null | 70 | const language = video.language || null |
61 | const licence = video.licence || null | 71 | const licence = video.licence || null |