diff --git a/package.json b/package.json index c7d265e..a5bf81b 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint" + "serve": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve ", + "build": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build ", + "lint": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint " }, "dependencies": { "axios": "^0.21.1", diff --git a/server/main.go b/server/main.go index 9a984b5..1416ad7 100644 --- a/server/main.go +++ b/server/main.go @@ -47,7 +47,7 @@ func initMovie() { width := 160 height := 120 log.Println(filename) - cmd := exec.Command("ffmpeg", "-i", filename, "-vframes", "1", "-s", fmt.Sprintf("%dx%d", width, height), "movie/"+key+".webp") + cmd := exec.Command("ffmpeg", "-i", filename, "-vframes", "1", "-s", fmt.Sprintf("%dx%d", width, height), "movie/"+key+".png") var buffer bytes.Buffer cmd.Stdout = &buffer if cmd.Run() != nil { @@ -56,12 +56,12 @@ func initMovie() { } filepath.Walk("./movie", func(path string, info fs.FileInfo, err error) error { - if !info.IsDir() && filepath.Ext(info.Name()) != ".webp" { + if !info.IsDir() && filepath.Ext(info.Name()) != ".png" { base := info.Name() log.Println(path, info.Name()) movies = append(movies, Movie{ Name: info.Name(), - Image: base[:strings.IndexByte(base, '.')] + ".webp", + Image: base[:strings.IndexByte(base, '.')] + ".png", }) } return nil diff --git a/server/main_test.go b/server/main_test.go new file mode 100644 index 0000000..ef64976 --- /dev/null +++ b/server/main_test.go @@ -0,0 +1,7 @@ +package main + +import "testing" + +func TestMain(t *testing.T) { + main() +} diff --git a/src/Config.vue b/src/Config.vue index 275d4ad..b54ca6a 100644 --- a/src/Config.vue +++ b/src/Config.vue @@ -4,9 +4,9 @@