Propagate configuration on load via downloads socket

This commit is contained in:
James Woglom
2022-08-29 20:27:34 -04:00
parent bbfde99aeb
commit 4a9f55adda
4 changed files with 24 additions and 14 deletions

View File

@@ -18,8 +18,8 @@ export class AppComponent implements AfterViewInit {
qualities: Quality[];
quality: string;
format: string;
folder: string;
addInProgress = false;
showFolderDropdown = false;
darkMode: boolean;
@ViewChild('queueMasterCheckbox') queueMasterCheckbox: MasterCheckboxComponent;
@@ -73,6 +73,14 @@ export class AppComponent implements AfterViewInit {
this.cookieService.set('metube_quality', this.quality, { expires: 3650 });
}
showAdvanced() {
return this.downloads.configuration['CUSTOM_DIR'] == 'true';
}
folderChanged() {
console.log("folder changed", this.folder);
}
setupTheme(cookieService) {
if (cookieService.check('metube_dark')) {
this.darkMode = cookieService.get('metube_dark') === "true"
@@ -115,10 +123,6 @@ export class AppComponent implements AfterViewInit {
this.quality = exists ? this.quality : 'best'
}
clickFolderDropdown() {
this.showFolderDropdown = !this.showFolderDropdown;
}
addDownload(url?: string, quality?: string, format?: string) {
url = url ?? this.addUrl
quality = quality ?? this.quality