diff options
-rw-r--r-- | client/src/app/+my-account/my-account-videos/my-account-videos.component.ts | 6 | ||||
-rw-r--r-- | server/models/video/video.ts | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts index d8c919fee..6ab6c2aa5 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts | |||
@@ -88,7 +88,8 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni | |||
88 | .subscribe( | 88 | .subscribe( |
89 | res => { | 89 | res => { |
90 | this.notificationsService.success('Success', `${toDeleteVideosIds.length} videos deleted.`) | 90 | this.notificationsService.success('Success', `${toDeleteVideosIds.length} videos deleted.`) |
91 | this.buildVideoPages() | 91 | this.abortSelectionMode() |
92 | this.reloadVideos() | ||
92 | }, | 93 | }, |
93 | 94 | ||
94 | err => this.notificationsService.error('Error', err.message) | 95 | err => this.notificationsService.error('Error', err.message) |
@@ -103,8 +104,7 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni | |||
103 | .subscribe( | 104 | .subscribe( |
104 | status => { | 105 | status => { |
105 | this.notificationsService.success('Success', `Video ${video.name} deleted.`) | 106 | this.notificationsService.success('Success', `Video ${video.name} deleted.`) |
106 | this.spliceVideosById(video.id) | 107 | this.reloadVideos() |
107 | this.buildVideoPages() | ||
108 | }, | 108 | }, |
109 | 109 | ||
110 | error => this.notificationsService.error('Error', error.message) | 110 | error => this.notificationsService.error('Error', error.message) |
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 967a899f5..012a758ee 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -5,7 +5,6 @@ import * as parseTorrent from 'parse-torrent' | |||
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import * as Sequelize from 'sequelize' | 6 | import * as Sequelize from 'sequelize' |
7 | import { | 7 | import { |
8 | AfterDestroy, | ||
9 | AllowNull, | 8 | AllowNull, |
10 | BeforeDestroy, | 9 | BeforeDestroy, |
11 | BelongsTo, | 10 | BelongsTo, |
@@ -32,7 +31,11 @@ import { Video, VideoDetails, VideoFile } from '../../../shared/models/videos' | |||
32 | import { VideoFilter } from '../../../shared/models/videos/video-query.type' | 31 | import { VideoFilter } from '../../../shared/models/videos/video-query.type' |
33 | import { activityPubCollection } from '../../helpers/activitypub' | 32 | import { activityPubCollection } from '../../helpers/activitypub' |
34 | import { | 33 | import { |
35 | createTorrentPromise, peertubeTruncate, renamePromise, statPromise, unlinkPromise, | 34 | createTorrentPromise, |
35 | peertubeTruncate, | ||
36 | renamePromise, | ||
37 | statPromise, | ||
38 | unlinkPromise, | ||
36 | writeFilePromise | 39 | writeFilePromise |
37 | } from '../../helpers/core-utils' | 40 | } from '../../helpers/core-utils' |
38 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | 41 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' |