mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-30 16:40:55 +03:00
Prevents login redirect for shared videos in multi user mode
This commit is contained in:
@@ -73,6 +73,8 @@ export class PostsService implements CanActivate {
|
|||||||
this.httpOptions.params = this.httpOptions.params.set('sessionID', this.session_id);
|
this.httpOptions.params = this.httpOptions.params.set('sessionID', this.session_id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const login_not_required = this.router.url !== '/player'
|
||||||
|
|
||||||
// get config
|
// get config
|
||||||
this.loadNavItems().subscribe(res => {
|
this.loadNavItems().subscribe(res => {
|
||||||
const result = !this.debugMode ? res['config_file'] : 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.token = localStorage.getItem('jwt_token');
|
||||||
this.httpOptions.params = this.httpOptions.params.set('jwt', this.token);
|
this.httpOptions.params = this.httpOptions.params.set('jwt', this.token);
|
||||||
this.jwtAuth();
|
this.jwtAuth();
|
||||||
|
} else if (login_not_required) {
|
||||||
|
this.setInitialized();
|
||||||
} else {
|
} else {
|
||||||
this.sendToLogin();
|
this.sendToLogin();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user