Toob Player UI

This commit is contained in:
Robin E. R. Davies
2025-06-07 21:52:23 -04:00
parent 82f94cb152
commit 6ea45f46df
29 changed files with 1860 additions and 319 deletions
+23 -11
View File
@@ -919,6 +919,7 @@ export class PiPedalModel //implements PiPedalModel
}
async onSocketReconnected(): Promise<void> {
this.cancelOnNetworkChanging();
this.cancelAndroidReconnectTimer();
@@ -977,6 +978,7 @@ export class PiPedalModel //implements PiPedalModel
}
}
async getAudioFileMetadata(filePath: string): Promise<AudioFileMetadata> {
try {
let url =
@@ -1822,6 +1824,27 @@ export class PiPedalModel //implements PiPedalModel
.request("setOnboarding", value);
}
moveAudioFile(
path: string,
from: number,
to: number
): Promise<boolean> {
return new Promise<boolean>(
(accept, reject) => {
this.webSocket?.request<boolean>("moveAudioFile", {
path: path,
from: from,
to: to
}).then(() => {
accept(true);
}).catch((e) => {
this.setError(getErrorMessage(e));
accept(false);
});
}
);
}
saveCurrentPresetAs(newName: string, saveAfterInstanceId = -1): Promise<number> {
// default behaviour is to save after the currently selected preset.
@@ -3094,17 +3117,6 @@ export class PiPedalModel //implements PiPedalModel
}
reorderAudioFiles(
path: string,
from: number,
to: number
) {
this.webSocket?.send("reorderAudioFiles", {
path: path,
from: from,
to: to
})
}
};
let instance: PiPedalModel | undefined = undefined;