Subscriptions now support multi-user-mode

Fixed bug where playlist subscription downloads would fail due to a mislabeled parameter

Components that are routes now make sure auth is finished before sending requests to the backend
This commit is contained in:
Tzahi12345
2020-04-30 04:54:41 -04:00
parent 0fb00bac12
commit 31f581c642
8 changed files with 207 additions and 96 deletions

View File

@@ -74,6 +74,8 @@ export class PostsService implements CanActivate {
};
this.jwtAuth();
}
} else {
this.config_reloaded.next(true);
}
}
});
@@ -107,7 +109,7 @@ export class PostsService implements CanActivate {
const result = !this.debugMode ? res['config_file'] : res;
if (result) {
this.config = result['YoutubeDLMaterial'];
this.config_reloaded = true;
this.config_reloaded.next(true);
}
});
}
@@ -348,6 +350,7 @@ export class PostsService implements CanActivate {
call.subscribe(res => {
if (res['token']) {
this.afterLogin(res['user'], res['token']);
this.config_reloaded.next(true);
}
}, err => {
if (err.status === 401) {