+
-
diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts
index f9e5a41..f48b934 100644
--- a/ui/src/app/app.component.ts
+++ b/ui/src/app/app.component.ts
@@ -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
diff --git a/ui/src/app/downloads.service.ts b/ui/src/app/downloads.service.ts
index 8580a70..eb7bac3 100644
--- a/ui/src/app/downloads.service.ts
+++ b/ui/src/app/downloads.service.ts
@@ -33,6 +33,7 @@ export class DownloadsService {
done = new Map
();
queueChanged = new Subject();
doneChanged = new Subject();
+ configuration = {};
constructor(private http: HttpClient, private socket: MeTubeSocket) {
socket.fromEvent('all').subscribe((strdata: string) => {
@@ -74,6 +75,11 @@ export class DownloadsService {
this.done.delete(data);
this.doneChanged.next(null);
});
+ socket.fromEvent('configuration').subscribe((strdata: string) => {
+ let data: string = JSON.parse(strdata);
+ console.debug("got configuration:", data);
+ this.configuration = data;
+ })
}
handleHTTPError(error: HttpErrorResponse) {