.subscribe(result => {
this.playlistsData = result.data
- this.videoPlaylistService.runPlaylistCheck(this.video.id)
+ this.videoPlaylistService.runVideoExistsInPlaylistCheck(this.video.id)
})
this.videoPlaylistSearchChanged
.subscribe(playlistsResult => {
this.playlistsData = playlistsResult.data
- this.videoPlaylistService.runPlaylistCheck(this.video.id)
+ this.videoPlaylistService.runVideoExistsInPlaylistCheck(this.video.id)
})
}
stopTimestamp: body.stopTimestamp
})
- this.runPlaylistCheck(body.videoId)
+ this.runVideoExistsInPlaylistCheck(body.videoId)
+
+ if (this.myAccountPlaylistCache) {
+ const playlist = this.myAccountPlaylistCache.data.find(p => p.id === playlistId)
+ if (!playlist) return
+
+ const otherPlaylists = this.myAccountPlaylistCache.data.filter(p => p !== playlist)
+ this.myAccountPlaylistCache.data = [ playlist, ...otherPlaylists ]
+ }
}),
catchError(err => this.restExtractor.handleError(err))
)
elem.stopTimestamp = body.stopTimestamp
}
- this.runPlaylistCheck(videoId)
+ this.runVideoExistsInPlaylistCheck(videoId)
}),
catchError(err => this.restExtractor.handleError(err))
)
.filter(e => e.playlistElementId !== playlistElementId)
}
- this.runPlaylistCheck(videoId)
+ this.runVideoExistsInPlaylistCheck(videoId)
}),
catchError(err => this.restExtractor.handleError(err))
)
return obs
}
- runPlaylistCheck (videoId: number) {
+ runVideoExistsInPlaylistCheck (videoId: number) {
debugLogger('Running playlist check.')
if (this.videoExistsCache[videoId]) {