diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-17 14:42:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-18 08:35:06 +0200 |
commit | 9df52d660feb722404be00a50f3c8a612bec1c15 (patch) | |
tree | dde52880fa012874d24c60f64eb596b0a789cc8b /client/src/app/+videos/+video-watch/shared/playlist | |
parent | adb8809d43648ea0a64d6845bb39aa3bd0e005a6 (diff) | |
download | PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.gz PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.zst PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.zip |
Migrate client to eslint
Diffstat (limited to 'client/src/app/+videos/+video-watch/shared/playlist')
-rw-r--r-- | client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts index f0f7966b1..78b3af4a7 100644 --- a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts +++ b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts | |||
@@ -39,7 +39,7 @@ export class VideoWatchPlaylistComponent { | |||
39 | private notifier: Notifier, | 39 | private notifier: Notifier, |
40 | private videoPlaylist: VideoPlaylistService, | 40 | private videoPlaylist: VideoPlaylistService, |
41 | private localStorageService: LocalStorageService, | 41 | private localStorageService: LocalStorageService, |
42 | private sessionStorageService: SessionStorageService, | 42 | private sessionStorage: SessionStorageService, |
43 | private router: Router | 43 | private router: Router |
44 | ) { | 44 | ) { |
45 | // defaults to true | 45 | // defaults to true |
@@ -50,7 +50,7 @@ export class VideoWatchPlaylistComponent { | |||
50 | this.setAutoPlayNextVideoPlaylistSwitchText() | 50 | this.setAutoPlayNextVideoPlaylistSwitchText() |
51 | 51 | ||
52 | // defaults to false | 52 | // defaults to false |
53 | this.loopPlaylist = this.sessionStorageService.getItem(VideoWatchPlaylistComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO_PLAYLIST) === 'true' | 53 | this.loopPlaylist = this.sessionStorage.getItem(VideoWatchPlaylistComponent.SESSION_STORAGE_AUTO_PLAY_NEXT_VIDEO_PLAYLIST) === 'true' |
54 | this.setLoopPlaylistSwitchText() | 54 | this.setLoopPlaylistSwitchText() |
55 | } | 55 | } |
56 | 56 | ||
@@ -145,7 +145,7 @@ export class VideoWatchPlaylistComponent { | |||
145 | 145 | ||
146 | const start = previous.startTimestamp | 146 | const start = previous.startTimestamp |
147 | const stop = previous.stopTimestamp | 147 | const stop = previous.stopTimestamp |
148 | this.router.navigate([],{ queryParams: { playlistPosition: previous.position, start, stop } }) | 148 | this.router.navigate([], { queryParams: { playlistPosition: previous.position, start, stop } }) |
149 | } | 149 | } |
150 | 150 | ||
151 | findPlaylistVideo (position: number, type: 'previous' | 'next'): VideoPlaylistElement { | 151 | findPlaylistVideo (position: number, type: 'previous' | 'next'): VideoPlaylistElement { |
@@ -163,7 +163,7 @@ export class VideoWatchPlaylistComponent { | |||
163 | } | 163 | } |
164 | 164 | ||
165 | const found = this.playlistElements.find(e => e.position === position) | 165 | const found = this.playlistElements.find(e => e.position === position) |
166 | if (found && found.video) return found | 166 | if (found?.video) return found |
167 | 167 | ||
168 | const newPosition = type === 'previous' | 168 | const newPosition = type === 'previous' |
169 | ? position - 1 | 169 | ? position - 1 |
@@ -178,7 +178,7 @@ export class VideoWatchPlaylistComponent { | |||
178 | 178 | ||
179 | const start = next.startTimestamp | 179 | const start = next.startTimestamp |
180 | const stop = next.stopTimestamp | 180 | const stop = next.stopTimestamp |
181 | this.router.navigate([],{ queryParams: { playlistPosition: next.position, start, stop } }) | 181 | this.router.navigate([], { queryParams: { playlistPosition: next.position, start, stop } }) |
182 | } | 182 | } |
183 | 183 | ||
184 | switchAutoPlayNextVideoPlaylist () { | 184 | switchAutoPlayNextVideoPlaylist () { |