diff --git a/#TestList.org# b/#TestList.org# new file mode 100644 index 0000000..028c389 --- /dev/null +++ b/#TestList.org# @@ -0,0 +1,19 @@ +* Virtual Machine Testing +To be completed after updating rhemawave-dev, deleting nixos.qcow2, and building rhemawavekiosk-dev + +- [ ] Closure builds +- [ ] VM Starts +- [ ] RadiantWave starts +- [ ] WiFi screen does NOT appear (no wifi nic in vm) +- [ ] Email Address scren appears +- [ ] I can type an email address +- [ ] I cannot submit an incomplete email +- [ ] I can submit a complete email +- [ ] License Key screen appears +- [ ] I can type a license key +- [ ] I cannot submit an incomplete license +- [ ] I can submit a complete license +- [ ] Home screen appears +- [ ] Version string is correct +- [ ] Status: Downloading files +- diff --git a/.#TestList.org b/.#TestList.org new file mode 120000 index 0000000..778bf34 --- /dev/null +++ b/.#TestList.org @@ -0,0 +1 @@ +nclack@muninn.28787:1782524461 \ No newline at end of file diff --git a/TestList.org b/TestList.org index 1df8a26..074657e 100644 --- a/TestList.org +++ b/TestList.org @@ -1,31 +1,2 @@ -- [X] Networks listed -- [X] Cursor moves between networks -- [X] Enter opens a password prompt for a protected network -- [X] You can type and see what you are typing -- [X] Email address page appears -- [X] Can type in email -- [X] Can submit email -- [X] License Key page appears -- [X] Can type in license key -- [X] Can submit license key -- [X] Version string is correct -- [X] Status: Downloading Assets -- [X] F3 navigates to settings -- [X] Cursor moves -- [X] Can view application logs -- [X] No logs are leaking proprietary information -- [X] WiFi setup shows connected to a network -- [X] License Key shows current license key -- [X] I can backspace the license key -- [X] I cannot submit an incomplete key -- [X] I can type in the box -- [X] I can submit the new key -- [X] License Key shows updated key -- [X] Email address shows current email -- [X] I can backspace characters -- [X] I cannot submit an incomplete email -- [X] I can type in the box -- [X] I can submit the new email -- [X] Email address shows new email -- [X] Audio page loads -- [ ] I can toggle the audio on and off +* Virtual Machine Testing +To be completed after updating rhemawave-dev, deleting nixos.qcow2, and building rhemawavekiosk-dev diff --git a/internal/application/application.go b/internal/application/application.go index eff967b..fbd8621 100644 --- a/internal/application/application.go +++ b/internal/application/application.go @@ -189,6 +189,13 @@ func Run() { audioDir := filepath.Join(config.AssetsDir, "audio") + _, err = os.Stat(audioDir) + if os.IsNotExist(err) { + if err = os.MkdirAll(audioDir, 0740); err != nil { + logger.Error("unable to create audio directory: %v", err) + } + } + go download.DownloadAudioFiles(app.PageRouter.Context.MessageChannel, audioDir, "https://files.radiantwavetech.com/audio/") app.runEventLoop() diff --git a/internal/download/Download.go b/internal/download/Download.go index 94437d4..56507a2 100644 --- a/internal/download/Download.go +++ b/internal/download/Download.go @@ -194,19 +194,6 @@ func fileMD5(path string) (string, error) { return fmt.Sprintf("%x", h.Sum(nil)), nil } -// remoteFileSize does a HEAD request and returns Content-Length. -func remoteFileSize(url string) (int64, error) { - resp, err := http.Head(url) - if err != nil { - return 0, err - } - resp.Body.Close() - if resp.StatusCode != http.StatusOK { - return 0, fmt.Errorf("HEAD %s: %s", url, resp.Status) - } - return resp.ContentLength, nil -} - // downloadFile streams url to destPath, calling onChunk(n) after each write // with the number of bytes just written. Returns total bytes downloaded. func downloadFile(url, destPath string, onChunk func(int64)) (int64, error) {