Reload my videos after delete

This commit is contained in:
Chocobozzz 2018-05-25 08:38:59 +02:00
parent a00a8f09f9
commit 06be7ed0b2
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 8 additions and 5 deletions

View File

@ -88,7 +88,8 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
.subscribe(
res => {
this.notificationsService.success('Success', `${toDeleteVideosIds.length} videos deleted.`)
this.buildVideoPages()
this.abortSelectionMode()
this.reloadVideos()
},
err => this.notificationsService.error('Error', err.message)
@ -103,8 +104,7 @@ export class MyAccountVideosComponent extends AbstractVideoList implements OnIni
.subscribe(
status => {
this.notificationsService.success('Success', `Video ${video.name} deleted.`)
this.spliceVideosById(video.id)
this.buildVideoPages()
this.reloadVideos()
},
error => this.notificationsService.error('Error', error.message)

View File

@ -5,7 +5,6 @@ import * as parseTorrent from 'parse-torrent'
import { join } from 'path'
import * as Sequelize from 'sequelize'
import {
AfterDestroy,
AllowNull,
BeforeDestroy,
BelongsTo,
@ -32,7 +31,11 @@ import { Video, VideoDetails, VideoFile } from '../../../shared/models/videos'
import { VideoFilter } from '../../../shared/models/videos/video-query.type'
import { activityPubCollection } from '../../helpers/activitypub'
import {
createTorrentPromise, peertubeTruncate, renamePromise, statPromise, unlinkPromise,
createTorrentPromise,
peertubeTruncate,
renamePromise,
statPromise,
unlinkPromise,
writeFilePromise
} from '../../helpers/core-utils'
import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'