diff options
Diffstat (limited to 'client/src/app/shared/shared-video-playlist/video-playlist.service.ts')
-rw-r--r-- | client/src/app/shared/shared-video-playlist/video-playlist.service.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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 dc1b56129..1b87e0b2a 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 | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as debug from 'debug' | 1 | import * as debug from 'debug' |
2 | import { uniq } from 'lodash-es' | 2 | import { uniq } from 'lodash-es' |
3 | import { asyncScheduler, merge, Observable, of, ReplaySubject, Subject } from 'rxjs' | 3 | import { asyncScheduler, merge, Observable, of, ReplaySubject, Subject } from 'rxjs' |
4 | import { bufferTime, catchError, filter, map, observeOn, share, switchMap, tap } from 'rxjs/operators' | 4 | import { bufferTime, catchError, filter, map, observeOn, share, switchMap, tap, distinctUntilChanged } from 'rxjs/operators' |
5 | import { HttpClient, HttpParams } from '@angular/common/http' | 5 | import { HttpClient, HttpParams } from '@angular/common/http' |
6 | import { Injectable, NgZone } from '@angular/core' | 6 | import { Injectable, NgZone } from '@angular/core' |
7 | import { AuthUser, ComponentPaginationLight, RestExtractor, RestService, ServerService } from '@app/core' | 7 | import { AuthUser, ComponentPaginationLight, RestExtractor, RestService, ServerService } from '@app/core' |
@@ -53,6 +53,7 @@ export class VideoPlaylistService { | |||
53 | ) { | 53 | ) { |
54 | this.videoExistsInPlaylistObservable = merge( | 54 | this.videoExistsInPlaylistObservable = merge( |
55 | this.videoExistsInPlaylistNotifier.pipe( | 55 | this.videoExistsInPlaylistNotifier.pipe( |
56 | distinctUntilChanged(), | ||
56 | // We leave Angular zone so Protractor does not get stuck | 57 | // We leave Angular zone so Protractor does not get stuck |
57 | bufferTime(500, leaveZone(this.ngZone, asyncScheduler)), | 58 | bufferTime(500, leaveZone(this.ngZone, asyncScheduler)), |
58 | filter(videoIds => videoIds.length !== 0), | 59 | filter(videoIds => videoIds.length !== 0), |