Settings are now more centralized in the frontend

This commit is contained in:
Adam Verga
2020-04-29 20:15:15 -04:00
parent ff51a49d1b
commit a48e122763
5 changed files with 73 additions and 87 deletions

View File

@@ -50,7 +50,11 @@ export class SubscriptionComponent implements OnInit {
this.id = this.route.snapshot.paramMap.get('id');
this.getSubscription();
this.getConfig();
this.postsService.config_reloaded.subscribe(changed => {
if (changed) {
this.getConfig();
}
});
}
// set filter property to cached
@@ -78,10 +82,7 @@ export class SubscriptionComponent implements OnInit {
}
getConfig() {
this.postsService.loadNavItems().subscribe(res => {
const result = !this.postsService.debugMode ? res['config_file'] : res;
this.use_youtubedl_archive = result['YoutubeDLMaterial']['Subscriptions']['subscriptions_use_youtubedl_archive'];
});
this.use_youtubedl_archive = this.postsService.config['Subscriptions']['subscriptions_use_youtubedl_archive'];
}
goToFile(emit_obj) {