From abfe0dad032b0df6c7b437edaae8a64b3dc7f4b7 Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Tue, 2 Jun 2020 20:03:01 -0400 Subject: [PATCH] Prevents login redirect for shared videos in multi user mode --- src/app/posts.services.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/posts.services.ts b/src/app/posts.services.ts index 4e68abd..85fcf03 100644 --- a/src/app/posts.services.ts +++ b/src/app/posts.services.ts @@ -73,6 +73,8 @@ export class PostsService implements CanActivate { this.httpOptions.params = this.httpOptions.params.set('sessionID', this.session_id); }); + const login_not_required = this.router.url !== '/player' + // get config this.loadNavItems().subscribe(res => { const result = !this.debugMode ? res['config_file'] : res; @@ -84,6 +86,8 @@ export class PostsService implements CanActivate { this.token = localStorage.getItem('jwt_token'); this.httpOptions.params = this.httpOptions.params.set('jwt', this.token); this.jwtAuth(); + } else if (login_not_required) { + this.setInitialized(); } else { this.sendToLogin(); }