aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-library/my-video-playlists
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-library/my-video-playlists')
-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
4 files changed, 32 insertions, 30 deletions
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) {