Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Fix the race condition where the logo wasn't copied over for the default thumbnail

Bradley Hiltonfade747cebf6
diff --git a/utils.go b/utils.go
index 36c84ee91a..87bba43867 100644
--- a/utils.go
+++ b/utils.go
@@ -46,8 +46,7 @@ func copy(src, dst string) {
return
}
- err = ioutil.WriteFile(dst, input, 0644)
- if err != nil {
+ if err = ioutil.WriteFile(dst, input, 0644); err != nil {
fmt.Println("Error creating", dst)
fmt.Println(err)
return
@@ -78,10 +77,11 @@ func resetDirectories(configuration Config) {
func createInitialOfflineState() {
// Provide default files
- showStreamOfflineState(configuration)
if !fileExists("webroot/thumbnail.png") {
- copy("static/logo.png", "webroot/thumbnail.png")
+ copy("static/logo-900x720.png", "webroot/thumbnail.png")
}
+
+ showStreamOfflineState(configuration)
}
func getClientIDFromRequest(req *http.Request) string {
diff --git a/webroot/thumbnail.png b/webroot/thumbnail.png
deleted file mode 100644
index 24acf3e003..0000000000
Binary files a/webroot/thumbnail.png and /dev/null differ