aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-library
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-17 11:27:47 +0200
committerChocobozzz <me@florianbigard.com>2021-08-17 14:01:45 +0200
commit1378c0d343028f3d40d7d795422684ab9e6a1599 (patch)
tree08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/app/+my-library
parentc186a67f90203af6bfa434f026efdc99193bcd65 (diff)
downloadPeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip
Fix client lint
Diffstat (limited to 'client/src/app/+my-library')
-rw-r--r--client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts8
-rw-r--r--client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts78
-rw-r--r--client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts8
-rw-r--r--client/src/app/+my-library/my-history/my-history.component.ts16
-rw-r--r--client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts8
-rw-r--r--client/src/app/+my-library/my-ownership/my-ownership.component.ts16
-rw-r--r--client/src/app/+my-library/my-subscriptions/my-subscriptions.component.ts8
-rw-r--r--client/src/app/+my-library/my-video-imports/my-video-imports.component.ts8
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts15
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts16
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts23
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts8
-rw-r--r--client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts16
-rw-r--r--client/src/app/+my-library/my-videos/my-videos.component.ts16
14 files changed, 124 insertions, 120 deletions
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts b/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts
index 433475f66..d983aacd9 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channel-create.component.ts
@@ -59,15 +59,15 @@ export class MyVideoChannelCreateComponent extends MyVideoChannelEdit implements
59 .pipe( 59 .pipe(
60 switchMap(() => this.uploadAvatar()), 60 switchMap(() => this.uploadAvatar()),
61 switchMap(() => this.uploadBanner()) 61 switchMap(() => this.uploadBanner())
62 ).subscribe( 62 ).subscribe({
63 () => { 63 next: () => {
64 this.authService.refreshUserInformation() 64 this.authService.refreshUserInformation()
65 65
66 this.notifier.success($localize`Video channel ${videoChannelCreate.displayName} created.`) 66 this.notifier.success($localize`Video channel ${videoChannelCreate.displayName} created.`)
67 this.router.navigate(['/my-library', 'video-channels']) 67 this.router.navigate(['/my-library', 'video-channels'])
68 }, 68 },
69 69
70 err => { 70 error: err => {
71 if (err.status === HttpStatusCode.CONFLICT_409) { 71 if (err.status === HttpStatusCode.CONFLICT_409) {
72 this.error = $localize`This name already exists on this instance.` 72 this.error = $localize`This name already exists on this instance.`
73 return 73 return
@@ -75,7 +75,7 @@ export class MyVideoChannelCreateComponent extends MyVideoChannelEdit implements
75 75
76 this.error = err.message 76 this.error = err.message
77 } 77 }
78 ) 78 })
79 } 79 }
80 80
81 onAvatarChange (formData: FormData) { 81 onAvatarChange (formData: FormData) {
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts b/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts
index eb24a60c5..e8bfbf9ce 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channel-update.component.ts
@@ -52,21 +52,22 @@ export class MyVideoChannelUpdateComponent extends MyVideoChannelEdit implements
52 this.paramsSub = this.route.params.subscribe(routeParams => { 52 this.paramsSub = this.route.params.subscribe(routeParams => {
53 const videoChannelId = routeParams['videoChannelId'] 53 const videoChannelId = routeParams['videoChannelId']
54 54
55 this.videoChannelService.getVideoChannel(videoChannelId).subscribe( 55 this.videoChannelService.getVideoChannel(videoChannelId)
56 videoChannelToUpdate => { 56 .subscribe({
57 this.videoChannel = videoChannelToUpdate 57 next: videoChannelToUpdate => {
58 58 this.videoChannel = videoChannelToUpdate
59 this.oldSupportField = videoChannelToUpdate.support 59
60 60 this.oldSupportField = videoChannelToUpdate.support
61 this.form.patchValue({ 61
62 'display-name': videoChannelToUpdate.displayName, 62 this.form.patchValue({
63 description: videoChannelToUpdate.description, 63 'display-name': videoChannelToUpdate.displayName,
64 support: videoChannelToUpdate.support 64 description: videoChannelToUpdate.description,
65 }) 65 support: videoChannelToUpdate.support
66 }, 66 })
67 },
67 68
68 err => this.error = err.message 69 error: err => this.error = err.message
69 ) 70 })
70 }) 71 })
71 } 72 }
72 73
@@ -85,77 +86,78 @@ export class MyVideoChannelUpdateComponent extends MyVideoChannelEdit implements
85 bulkVideosSupportUpdate: body.bulkVideosSupportUpdate || false 86 bulkVideosSupportUpdate: body.bulkVideosSupportUpdate || false
86 } 87 }
87 88
88 this.videoChannelService.updateVideoChannel(this.videoChannel.name, videoChannelUpdate).subscribe( 89 this.videoChannelService.updateVideoChannel(this.videoChannel.name, videoChannelUpdate)
89 () => { 90 .subscribe({
90 this.authService.refreshUserInformation() 91 next: () => {
92 this.authService.refreshUserInformation()
91 93
92 this.notifier.success($localize`Video channel ${videoChannelUpdate.displayName} updated.`) 94 this.notifier.success($localize`Video channel ${videoChannelUpdate.displayName} updated.`)
93 95
94 this.router.navigate([ '/my-library', 'video-channels' ]) 96 this.router.navigate([ '/my-library', 'video-channels' ])
95 }, 97 },
96 98
97 err => this.error = err.message 99 error: err => this.error = err.message
98 ) 100 })
99 } 101 }
100 102
101 onAvatarChange (formData: FormData) { 103 onAvatarChange (formData: FormData) {
102 this.videoChannelService.changeVideoChannelImage(this.videoChannel.name, formData, 'avatar') 104 this.videoChannelService.changeVideoChannelImage(this.videoChannel.name, formData, 'avatar')
103 .subscribe( 105 .subscribe({
104 data => { 106 next: data => {
105 this.notifier.success($localize`Avatar changed.`) 107 this.notifier.success($localize`Avatar changed.`)
106 108
107 this.videoChannel.updateAvatar(data.avatar) 109 this.videoChannel.updateAvatar(data.avatar)
108 }, 110 },
109 111
110 (err: HttpErrorResponse) => genericUploadErrorHandler({ 112 error: (err: HttpErrorResponse) => genericUploadErrorHandler({
111 err, 113 err,
112 name: $localize`avatar`, 114 name: $localize`avatar`,
113 notifier: this.notifier 115 notifier: this.notifier
114 }) 116 })
115 ) 117 })
116 } 118 }
117 119
118 onAvatarDelete () { 120 onAvatarDelete () {
119 this.videoChannelService.deleteVideoChannelImage(this.videoChannel.name, 'avatar') 121 this.videoChannelService.deleteVideoChannelImage(this.videoChannel.name, 'avatar')
120 .subscribe( 122 .subscribe({
121 data => { 123 next: () => {
122 this.notifier.success($localize`Avatar deleted.`) 124 this.notifier.success($localize`Avatar deleted.`)
123 125
124 this.videoChannel.resetAvatar() 126 this.videoChannel.resetAvatar()
125 }, 127 },
126 128
127 err => this.notifier.error(err.message) 129 error: err => this.notifier.error(err.message)
128 ) 130 })
129 } 131 }
130 132
131 onBannerChange (formData: FormData) { 133 onBannerChange (formData: FormData) {
132 this.videoChannelService.changeVideoChannelImage(this.videoChannel.name, formData, 'banner') 134 this.videoChannelService.changeVideoChannelImage(this.videoChannel.name, formData, 'banner')
133 .subscribe( 135 .subscribe({
134 data => { 136 next: data => {
135 this.notifier.success($localize`Banner changed.`) 137 this.notifier.success($localize`Banner changed.`)
136 138
137 this.videoChannel.updateBanner(data.banner) 139 this.videoChannel.updateBanner(data.banner)
138 }, 140 },
139 141
140 (err: HttpErrorResponse) => genericUploadErrorHandler({ 142 error: (err: HttpErrorResponse) => genericUploadErrorHandler({
141 err, 143 err,
142 name: $localize`banner`, 144 name: $localize`banner`,
143 notifier: this.notifier 145 notifier: this.notifier
144 }) 146 })
145 ) 147 })
146 } 148 }
147 149
148 onBannerDelete () { 150 onBannerDelete () {
149 this.videoChannelService.deleteVideoChannelImage(this.videoChannel.name, 'banner') 151 this.videoChannelService.deleteVideoChannelImage(this.videoChannel.name, 'banner')
150 .subscribe( 152 .subscribe({
151 data => { 153 next: () => {
152 this.notifier.success($localize`Banner deleted.`) 154 this.notifier.success($localize`Banner deleted.`)
153 155
154 this.videoChannel.resetBanner() 156 this.videoChannel.resetBanner()
155 }, 157 },
156 158
157 err => this.notifier.error(err.message) 159 error: err => this.notifier.error(err.message)
158 ) 160 })
159 } 161 }
160 162
161 get maxAvatarSize () { 163 get maxAvatarSize () {
diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts
index b6a2f592d..8b665fd58 100644
--- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts
+++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.ts
@@ -54,14 +54,14 @@ channel with the same name (${videoChannel.name})!`,
54 if (res === false) return 54 if (res === false) return
55 55
56 this.videoChannelService.removeVideoChannel(videoChannel) 56 this.videoChannelService.removeVideoChannel(videoChannel)
57 .subscribe( 57 .subscribe({
58 () => { 58 next: () => {
59 this.loadVideoChannels() 59 this.loadVideoChannels()
60 this.notifier.success($localize`Video channel ${videoChannel.displayName} deleted.`) 60 this.notifier.success($localize`Video channel ${videoChannel.displayName} deleted.`)
61 }, 61 },
62 62
63 error => this.notifier.error(error.message) 63 error: err => this.notifier.error(err.message)
64 ) 64 })
65 } 65 }
66 66
67 private loadVideoChannels () { 67 private loadVideoChannels () {
diff --git a/client/src/app/+my-library/my-history/my-history.component.ts b/client/src/app/+my-library/my-history/my-history.component.ts
index ad83db7ab..fe6e86346 100644
--- a/client/src/app/+my-library/my-history/my-history.component.ts
+++ b/client/src/app/+my-library/my-history/my-history.component.ts
@@ -107,8 +107,8 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook {
107 107
108 onVideosHistoryChange () { 108 onVideosHistoryChange () {
109 this.userService.updateMyProfile({ videosHistoryEnabled: this.videosHistoryEnabled }) 109 this.userService.updateMyProfile({ videosHistoryEnabled: this.videosHistoryEnabled })
110 .subscribe( 110 .subscribe({
111 () => { 111 next: () => {
112 const message = this.videosHistoryEnabled === true ? 112 const message = this.videosHistoryEnabled === true ?
113 $localize`Videos history is enabled` : 113 $localize`Videos history is enabled` :
114 $localize`Videos history is disabled` 114 $localize`Videos history is disabled`
@@ -118,8 +118,8 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook {
118 this.authService.refreshUserInformation() 118 this.authService.refreshUserInformation()
119 }, 119 },
120 120
121 err => this.notifier.error(err.message) 121 error: err => this.notifier.error(err.message)
122 ) 122 })
123 } 123 }
124 124
125 async deleteHistory () { 125 async deleteHistory () {
@@ -130,14 +130,14 @@ export class MyHistoryComponent implements OnInit, DisableForReuseHook {
130 if (res !== true) return 130 if (res !== true) return
131 131
132 this.userHistoryService.deleteUserVideosHistory() 132 this.userHistoryService.deleteUserVideosHistory()
133 .subscribe( 133 .subscribe({
134 () => { 134 next: () => {
135 this.notifier.success($localize`Videos history deleted`) 135 this.notifier.success($localize`Videos history deleted`)
136 136
137 this.reloadData() 137 this.reloadData()
138 }, 138 },
139 139
140 err => this.notifier.error(err.message) 140 error: err => this.notifier.error(err.message)
141 ) 141 })
142 } 142 }
143} 143}
diff --git a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
index 7889d0985..b92377bca 100644
--- a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
+++ b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
@@ -64,14 +64,14 @@ export class MyAcceptOwnershipComponent extends FormReactive implements OnInit {
64 const videoChangeOwnership = this.videoChangeOwnership 64 const videoChangeOwnership = this.videoChangeOwnership
65 this.videoOwnershipService 65 this.videoOwnershipService
66 .acceptOwnership(videoChangeOwnership.id, { channelId: channel }) 66 .acceptOwnership(videoChangeOwnership.id, { channelId: channel })
67 .subscribe( 67 .subscribe({
68 () => { 68 next: () => {
69 this.notifier.success($localize`Ownership accepted`) 69 this.notifier.success($localize`Ownership accepted`)
70 if (this.accepted) this.accepted.emit() 70 if (this.accepted) this.accepted.emit()
71 this.videoChangeOwnership = undefined 71 this.videoChangeOwnership = undefined
72 }, 72 },
73 73
74 err => this.notifier.error(err.message) 74 error: err => this.notifier.error(err.message)
75 ) 75 })
76 } 76 }
77} 77}
diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-ownership.component.ts
index aaf028474..7ea940ceb 100644
--- a/client/src/app/+my-library/my-ownership/my-ownership.component.ts
+++ b/client/src/app/+my-library/my-ownership/my-ownership.component.ts
@@ -53,16 +53,16 @@ export class MyOwnershipComponent extends RestTable implements OnInit {
53 53
54 refuse (videoChangeOwnership: VideoChangeOwnership) { 54 refuse (videoChangeOwnership: VideoChangeOwnership) {
55 this.videoOwnershipService.refuseOwnership(videoChangeOwnership.id) 55 this.videoOwnershipService.refuseOwnership(videoChangeOwnership.id)
56 .subscribe( 56 .subscribe({
57 () => this.reloadData(), 57 next: () => this.reloadData(),
58 err => this.notifier.error(err.message) 58 error: err => this.notifier.error(err.message)
59 ) 59 })
60 } 60 }
61 61
62 protected reloadData () { 62 protected reloadData () {
63 return this.videoOwnershipService.getOwnershipChanges(this.pagination, this.sort) 63 return this.videoOwnershipService.getOwnershipChanges(this.pagination, this.sort)
64 .subscribe( 64 .subscribe({
65 resultList => { 65 next: resultList => {
66 this.videoChangeOwnerships = resultList.data.map(change => ({ 66 this.videoChangeOwnerships = resultList.data.map(change => ({
67 ...change, 67 ...change,
68 initiatorAccount: new Account(change.initiatorAccount), 68 initiatorAccount: new Account(change.initiatorAccount),
@@ -71,7 +71,7 @@ export class MyOwnershipComponent extends RestTable implements OnInit {
71 this.totalRecords = resultList.total 71 this.totalRecords = resultList.total
72 }, 72 },
73 73
74 err => this.notifier.error(err.message) 74 error: err => this.notifier.error(err.message)
75 ) 75 })
76 } 76 }
77} 77}
diff --git a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.ts b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.ts
index 1f4a931a0..f676aa014 100644
--- a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.ts
+++ b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.ts
@@ -41,8 +41,8 @@ export class MySubscriptionsComponent {
41 41
42 private loadSubscriptions (more = true) { 42 private loadSubscriptions (more = true) {
43 this.userSubscriptionService.listSubscriptions({ pagination: this.pagination, search: this.search }) 43 this.userSubscriptionService.listSubscriptions({ pagination: this.pagination, search: this.search })
44 .subscribe( 44 .subscribe({
45 res => { 45 next: res => {
46 this.videoChannels = more 46 this.videoChannels = more
47 ? this.videoChannels.concat(res.data) 47 ? this.videoChannels.concat(res.data)
48 : res.data 48 : res.data
@@ -51,7 +51,7 @@ export class MySubscriptionsComponent {
51 this.onDataSubject.next(res.data) 51 this.onDataSubject.next(res.data)
52 }, 52 },
53 53
54 error => this.notifier.error(error.message) 54 error: err => this.notifier.error(err.message)
55 ) 55 })
56 } 56 }
57} 57}
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts
index 68254526a..914785bf7 100644
--- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts
+++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts
@@ -64,13 +64,13 @@ export class MyVideoImportsComponent extends RestTable implements OnInit {
64 64
65 protected reloadData () { 65 protected reloadData () {
66 this.videoImportService.getMyVideoImports(this.pagination, this.sort) 66 this.videoImportService.getMyVideoImports(this.pagination, this.sort)
67 .subscribe( 67 .subscribe({
68 resultList => { 68 next: resultList => {
69 this.videoImports = resultList.data 69 this.videoImports = resultList.data
70 this.totalRecords = resultList.total 70 this.totalRecords = resultList.total
71 }, 71 },
72 72
73 err => this.notifier.error(err.message) 73 error: err => this.notifier.error(err.message)
74 ) 74 })
75 } 75 }
76} 76}
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
index 8606a875a..3e3c3c878 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
@@ -71,14 +71,15 @@ export class MyVideoPlaylistCreateComponent extends MyVideoPlaylistEdit implemen
71 thumbnailfile: body.thumbnailfile || null 71 thumbnailfile: body.thumbnailfile || null
72 } 72 }
73 73
74 this.videoPlaylistService.createVideoPlaylist(videoPlaylistCreate).subscribe( 74 this.videoPlaylistService.createVideoPlaylist(videoPlaylistCreate)
75 () => { 75 .subscribe({
76 this.notifier.success($localize`Playlist ${videoPlaylistCreate.displayName} created.`) 76 next: () => {
77 this.router.navigate([ '/my-library', 'video-playlists' ]) 77 this.notifier.success($localize`Playlist ${videoPlaylistCreate.displayName} created.`)
78 }, 78 this.router.navigate([ '/my-library', 'video-playlists' ])
79 },
79 80
80 err => this.error = err.message 81 error: err => this.error = err.message
81 ) 82 })
82 } 83 }
83 84
84 isCreation () { 85 isCreation () {
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
index 86fe70710..6aff5dbd7 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
@@ -85,13 +85,13 @@ export class MyVideoPlaylistElementsComponent implements OnInit, OnDestroy {
85 this.playlistElements.splice(newIndex, 0, element) 85 this.playlistElements.splice(newIndex, 0, element)
86 86
87 this.videoPlaylistService.reorderPlaylist(this.playlist.id, oldPosition, insertAfter) 87 this.videoPlaylistService.reorderPlaylist(this.playlist.id, oldPosition, insertAfter)
88 .subscribe( 88 .subscribe({
89 () => { 89 next: () => {
90 this.reorderClientPositions() 90 this.reorderClientPositions()
91 }, 91 },
92 92
93 err => this.notifier.error(err.message) 93 error: err => this.notifier.error(err.message)
94 ) 94 })
95 } 95 }
96 96
97 onElementRemoved (element: VideoPlaylistElement) { 97 onElementRemoved (element: VideoPlaylistElement) {
@@ -129,14 +129,14 @@ export class MyVideoPlaylistElementsComponent implements OnInit, OnDestroy {
129 if (res === false) return 129 if (res === false) return
130 130
131 this.videoPlaylistService.removeVideoPlaylist(videoPlaylist) 131 this.videoPlaylistService.removeVideoPlaylist(videoPlaylist)
132 .subscribe( 132 .subscribe({
133 () => { 133 next: () => {
134 this.router.navigate([ '/my-library', 'video-playlists' ]) 134 this.router.navigate([ '/my-library', 'video-playlists' ])
135 this.notifier.success($localize`Playlist ${videoPlaylist.displayName} deleted.`) 135 this.notifier.success($localize`Playlist ${videoPlaylist.displayName} deleted.`)
136 }, 136 },
137 137
138 error => this.notifier.error(error.message) 138 error: err => this.notifier.error(err.message)
139 ) 139 })
140 } 140 }
141 141
142 /** 142 /**
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
index c554d3772..a3f54279b 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
@@ -64,16 +64,16 @@ export class MyVideoPlaylistUpdateComponent extends MyVideoPlaylistEdit implemen
64 ]) 64 ])
65 }) 65 })
66 ) 66 )
67 .subscribe( 67 .subscribe({
68 ([ videoPlaylistToUpdate, videoPlaylistPrivacies]) => { 68 next: ([ videoPlaylistToUpdate, videoPlaylistPrivacies]) => {
69 this.videoPlaylistToUpdate = videoPlaylistToUpdate 69 this.videoPlaylistToUpdate = videoPlaylistToUpdate
70 this.videoPlaylistPrivacies = videoPlaylistPrivacies 70 this.videoPlaylistPrivacies = videoPlaylistPrivacies
71 71
72 this.hydrateFormFromPlaylist() 72 this.hydrateFormFromPlaylist()
73 }, 73 },
74 74
75 err => this.error = err.message 75 error: err => this.error = err.message
76 ) 76 })
77 } 77 }
78 78
79 ngOnDestroy () { 79 ngOnDestroy () {
@@ -92,14 +92,15 @@ export class MyVideoPlaylistUpdateComponent extends MyVideoPlaylistEdit implemen
92 thumbnailfile: body.thumbnailfile || undefined 92 thumbnailfile: body.thumbnailfile || undefined
93 } 93 }
94 94
95 this.videoPlaylistService.updateVideoPlaylist(this.videoPlaylistToUpdate, videoPlaylistUpdate).subscribe( 95 this.videoPlaylistService.updateVideoPlaylist(this.videoPlaylistToUpdate, videoPlaylistUpdate)
96 () => { 96 .subscribe({
97 this.notifier.success($localize`Playlist ${videoPlaylistUpdate.displayName} updated.`) 97 next: () => {
98 this.router.navigate([ '/my-library', 'video-playlists' ]) 98 this.notifier.success($localize`Playlist ${videoPlaylistUpdate.displayName} updated.`)
99 }, 99 this.router.navigate([ '/my-library', 'video-playlists' ])
100 },
100 101
101 err => this.error = err.message 102 error: err => this.error = err.message
102 ) 103 })
103 } 104 }
104 105
105 isCreation () { 106 isCreation () {
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts
index d90102693..f0e4c348b 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts
@@ -37,16 +37,16 @@ export class MyVideoPlaylistsComponent {
37 if (res === false) return 37 if (res === false) return
38 38
39 this.videoPlaylistService.removeVideoPlaylist(videoPlaylist) 39 this.videoPlaylistService.removeVideoPlaylist(videoPlaylist)
40 .subscribe( 40 .subscribe({
41 () => { 41 next: () => {
42 this.videoPlaylists = this.videoPlaylists 42 this.videoPlaylists = this.videoPlaylists
43 .filter(p => p.id !== videoPlaylist.id) 43 .filter(p => p.id !== videoPlaylist.id)
44 44
45 this.notifier.success($localize`Playlist ${videoPlaylist.displayName}} deleted.`) 45 this.notifier.success($localize`Playlist ${videoPlaylist.displayName}} deleted.`)
46 }, 46 },
47 47
48 error => this.notifier.error(error.message) 48 error: err => this.notifier.error(err.message)
49 ) 49 })
50 } 50 }
51 51
52 isRegularPlaylist (playlist: VideoPlaylist) { 52 isRegularPlaylist (playlist: VideoPlaylist) {
diff --git a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts
index 84237dee1..8c1f94bf3 100644
--- a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts
+++ b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts
@@ -48,11 +48,11 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni
48 search (event: { query: string }) { 48 search (event: { query: string }) {
49 const query = event.query 49 const query = event.query
50 this.userService.autocomplete(query) 50 this.userService.autocomplete(query)
51 .subscribe( 51 .subscribe({
52 usernames => this.usernamePropositions = usernames, 52 next: usernames => this.usernamePropositions = usernames,
53 53
54 err => this.notifier.error(err.message) 54 error: err => this.notifier.error(err.message)
55 ) 55 })
56 } 56 }
57 57
58 changeOwnership () { 58 changeOwnership () {
@@ -60,10 +60,10 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni
60 60
61 this.videoOwnershipService 61 this.videoOwnershipService
62 .changeOwnership(this.video.id, username) 62 .changeOwnership(this.video.id, username)
63 .subscribe( 63 .subscribe({
64 () => this.notifier.success($localize`Ownership change request sent.`), 64 next: () => this.notifier.success($localize`Ownership change request sent.`),
65 65
66 err => this.notifier.error(err.message) 66 error: err => this.notifier.error(err.message)
67 ) 67 })
68 } 68 }
69} 69}
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts
index 1e4a4406d..4f9b71cc6 100644
--- a/client/src/app/+my-library/my-videos/my-videos.component.ts
+++ b/client/src/app/+my-library/my-videos/my-videos.component.ts
@@ -126,14 +126,14 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
126 126
127 concat(...observables) 127 concat(...observables)
128 .pipe(toArray()) 128 .pipe(toArray())
129 .subscribe( 129 .subscribe({
130 () => { 130 next: () => {
131 this.notifier.success($localize`${toDeleteVideosIds.length} videos deleted.`) 131 this.notifier.success($localize`${toDeleteVideosIds.length} videos deleted.`)
132 this.selection = {} 132 this.selection = {}
133 }, 133 },
134 134
135 err => this.notifier.error(err.message) 135 error: err => this.notifier.error(err.message)
136 ) 136 })
137 } 137 }
138 138
139 async deleteVideo (video: Video) { 139 async deleteVideo (video: Video) {
@@ -144,14 +144,14 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
144 if (res === false) return 144 if (res === false) return
145 145
146 this.videoService.removeVideo(video.id) 146 this.videoService.removeVideo(video.id)
147 .subscribe( 147 .subscribe({
148 () => { 148 next: () => {
149 this.notifier.success($localize`Video ${video.name} deleted.`) 149 this.notifier.success($localize`Video ${video.name} deleted.`)
150 this.removeVideoFromArray(video.id) 150 this.removeVideoFromArray(video.id)
151 }, 151 },
152 152
153 error => this.notifier.error(error.message) 153 error: err => this.notifier.error(err.message)
154 ) 154 })
155 } 155 }
156 156
157 changeOwnership (video: Video) { 157 changeOwnership (video: Video) {