diff options
author | Chocobozzz <me@florianbigard.com> | 2022-07-15 15:30:14 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-07-18 11:37:18 +0200 |
commit | 42b40636991b97fe818007fab19091764fc5db73 (patch) | |
tree | db431787c06ce898d22e91ff771f795219274fc6 /client/src/standalone/videos/shared/playlist-tracker.ts | |
parent | 654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff) | |
download | PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip |
Add ability for client to create server logs
Diffstat (limited to 'client/src/standalone/videos/shared/playlist-tracker.ts')
-rw-r--r-- | client/src/standalone/videos/shared/playlist-tracker.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/standalone/videos/shared/playlist-tracker.ts b/client/src/standalone/videos/shared/playlist-tracker.ts index 75d10b4e2..9ea4be83f 100644 --- a/client/src/standalone/videos/shared/playlist-tracker.ts +++ b/client/src/standalone/videos/shared/playlist-tracker.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import { VideoPlaylist, VideoPlaylistElement } from '../../../../../shared/models' | 1 | import { VideoPlaylist, VideoPlaylistElement } from '../../../../../shared/models' |
2 | import { logger } from '../../../root-helpers' | ||
2 | 3 | ||
3 | export class PlaylistTracker { | 4 | export class PlaylistTracker { |
4 | private currentPlaylistElement: VideoPlaylistElement | 5 | private currentPlaylistElement: VideoPlaylistElement |
@@ -68,7 +69,7 @@ export class PlaylistTracker { | |||
68 | setPosition (position: number) { | 69 | setPosition (position: number) { |
69 | this.currentPlaylistElement = this.playlistElements.find(e => e.position === position) | 70 | this.currentPlaylistElement = this.playlistElements.find(e => e.position === position) |
70 | if (!this.currentPlaylistElement || !this.currentPlaylistElement.video) { | 71 | if (!this.currentPlaylistElement || !this.currentPlaylistElement.video) { |
71 | console.error('Current playlist element is not valid.', this.currentPlaylistElement) | 72 | logger.error('Current playlist element is not valid.', this.currentPlaylistElement) |
72 | this.currentPlaylistElement = this.getNextPlaylistElement() | 73 | this.currentPlaylistElement = this.getNextPlaylistElement() |
73 | } | 74 | } |
74 | 75 | ||