aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-playlist
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-15 15:30:14 +0200
committerChocobozzz <me@florianbigard.com>2022-07-18 11:37:18 +0200
commit42b40636991b97fe818007fab19091764fc5db73 (patch)
treedb431787c06ce898d22e91ff771f795219274fc6 /client/src/app/shared/shared-video-playlist
parent654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff)
downloadPeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz
PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst
PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip
Add ability for client to create server logs
Diffstat (limited to 'client/src/app/shared/shared-video-playlist')
-rw-r--r--client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts10
-rw-r--r--client/src/app/shared/shared-video-playlist/video-playlist.service.ts8
2 files changed, 9 insertions, 9 deletions
diff --git a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts
index e4972ec10..e019fdd26 100644
--- a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts
+++ b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts
@@ -16,7 +16,7 @@ import {
16import { VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR } from '../form-validators/video-playlist-validators' 16import { VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR } from '../form-validators/video-playlist-validators'
17import { CachedPlaylist, VideoPlaylistService } from './video-playlist.service' 17import { CachedPlaylist, VideoPlaylistService } from './video-playlist.service'
18 18
19const logger = debug('peertube:playlists:VideoAddToPlaylistComponent') 19const debugLogger = debug('peertube:playlists:VideoAddToPlaylistComponent')
20 20
21type PlaylistElement = { 21type PlaylistElement = {
22 enabled: boolean 22 enabled: boolean
@@ -110,7 +110,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit,
110 } 110 }
111 111
112 reload () { 112 reload () {
113 logger('Reloading component') 113 debugLogger('Reloading component')
114 114
115 this.videoPlaylists = [] 115 this.videoPlaylists = []
116 this.videoPlaylistSearch = undefined 116 this.videoPlaylistSearch = undefined
@@ -121,7 +121,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit,
121 } 121 }
122 122
123 load () { 123 load () {
124 logger('Loading component') 124 debugLogger('Loading component')
125 125
126 this.listenToVideoPlaylistChange() 126 this.listenToVideoPlaylistChange()
127 127
@@ -331,7 +331,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit,
331 } 331 }
332 332
333 private rebuildPlaylists (existResult: VideoExistInPlaylist[]) { 333 private rebuildPlaylists (existResult: VideoExistInPlaylist[]) {
334 logger('Got existing results for %d.', this.video.id, existResult) 334 debugLogger('Got existing results for %d.', this.video.id, existResult)
335 335
336 const oldPlaylists = this.videoPlaylists 336 const oldPlaylists = this.videoPlaylists
337 337
@@ -359,7 +359,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit,
359 this.videoPlaylists.push(playlistSummary) 359 this.videoPlaylists.push(playlistSummary)
360 } 360 }
361 361
362 logger('Rebuilt playlist state for video %d.', this.video.id, this.videoPlaylists) 362 debugLogger('Rebuilt playlist state for video %d.', this.video.id, this.videoPlaylists)
363 363
364 this.cd.markForCheck() 364 this.cd.markForCheck()
365 } 365 }
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
index db9f78a7a..81ae0f292 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
@@ -23,7 +23,7 @@ import { environment } from '../../../environments/environment'
23import { VideoPlaylistElement } from './video-playlist-element.model' 23import { VideoPlaylistElement } from './video-playlist-element.model'
24import { VideoPlaylist } from './video-playlist.model' 24import { VideoPlaylist } from './video-playlist.model'
25 25
26const logger = debug('peertube:playlists:VideoPlaylistService') 26const debugLogger = debug('peertube:playlists:VideoPlaylistService')
27 27
28export type CachedPlaylist = VideoPlaylist | { id: number, displayName: string } 28export type CachedPlaylist = VideoPlaylist | { id: number, displayName: string }
29 29
@@ -287,15 +287,15 @@ export class VideoPlaylistService {
287 } 287 }
288 288
289 runPlaylistCheck (videoId: number) { 289 runPlaylistCheck (videoId: number) {
290 logger('Running playlist check.') 290 debugLogger('Running playlist check.')
291 291
292 if (this.videoExistsCache[videoId]) { 292 if (this.videoExistsCache[videoId]) {
293 logger('Found cache for %d.', videoId) 293 debugLogger('Found cache for %d.', videoId)
294 294
295 return this.videoExistsInPlaylistCacheSubject.next({ [videoId]: this.videoExistsCache[videoId] }) 295 return this.videoExistsInPlaylistCacheSubject.next({ [videoId]: this.videoExistsCache[videoId] })
296 } 296 }
297 297
298 logger('Fetching from network for %d.', videoId) 298 debugLogger('Fetching from network for %d.', videoId)
299 return this.videoExistsInPlaylistNotifier.next(videoId) 299 return this.videoExistsInPlaylistNotifier.next(videoId)
300 } 300 }
301 301