mirror of
https://github.com/owncast/owncast.git
synced 2024-11-24 05:38:58 +03:00
Remove the previous thumbnail when restarting
This commit is contained in:
parent
42371a30fe
commit
453bdd88a6
1 changed files with 4 additions and 2 deletions
6
utils.go
6
utils.go
|
@ -46,7 +46,7 @@ func copy(src, dst string) {
|
|||
return
|
||||
}
|
||||
|
||||
if err = ioutil.WriteFile(dst, input, 0644); err != nil {
|
||||
if err := ioutil.WriteFile(dst, input, 0644); err != nil {
|
||||
fmt.Println("Error creating", dst)
|
||||
fmt.Println(err)
|
||||
return
|
||||
|
@ -62,6 +62,9 @@ func resetDirectories(configuration Config) {
|
|||
os.MkdirAll(configuration.PublicHLSPath, 0777)
|
||||
os.MkdirAll(configuration.PrivateHLSPath, 0777)
|
||||
|
||||
// Remove the previous thumbnail
|
||||
os.Remove("webroot/thumbnail.png")
|
||||
|
||||
// Create private hls data dirs
|
||||
if !configuration.VideoSettings.EnablePassthrough || len(configuration.VideoSettings.StreamQualities) == 0 {
|
||||
for index := range configuration.VideoSettings.StreamQualities {
|
||||
|
@ -72,7 +75,6 @@ func resetDirectories(configuration Config) {
|
|||
os.MkdirAll(path.Join(configuration.PrivateHLSPath, strconv.Itoa(0)), 0777)
|
||||
os.MkdirAll(path.Join(configuration.PublicHLSPath, strconv.Itoa(0)), 0777)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func createInitialOfflineState() {
|
||||
|
|
Loading…
Reference in a new issue