inputFilters: AdvancedInputFilter[] = [
{
- queryParams: { 'search': 'isLive:true' },
+ queryParams: { search: 'isLive:true' },
label: $localize`Only live videos`
}
]
+ disabled = false
+
private search: string
constructor (
this.buildActions()
this.user = this.authService.getUser()
+
+ if (this.route.snapshot.queryParams['search']) {
+ this.search = this.route.snapshot.queryParams['search']
+ }
}
onSearch (search: string) {
}
disableForReuse () {
- this.videosSelection.disableForReuse()
+ this.disabled = true
}
enabledForReuse () {
- this.videosSelection.enabledForReuse()
+ this.disabled = false
}
getVideosObservable (page: number) {
async deleteSelectedVideos () {
const toDeleteVideosIds = Object.keys(this.selection)
- .filter(k => this.selection[ k ] === true)
+ .filter(k => this.selection[k] === true)
.map(k => parseInt(k, 10))
const res = await this.confirmService.confirm(
concat(...observables)
.pipe(toArray())
- .subscribe(
- () => {
+ .subscribe({
+ next: () => {
this.notifier.success($localize`${toDeleteVideosIds.length} videos deleted.`)
this.selection = {}
},
- err => this.notifier.error(err.message)
- )
+ error: err => this.notifier.error(err.message)
+ })
}
async deleteVideo (video: Video) {
if (res === false) return
this.videoService.removeVideo(video.id)
- .subscribe(
- () => {
+ .subscribe({
+ next: () => {
this.notifier.success($localize`Video ${video.name} deleted.`)
this.removeVideoFromArray(video.id)
},
- error => this.notifier.error(error.message)
- )
+ error: err => this.notifier.error(err.message)
+ })
}
changeOwnership (video: Video) {