navidrome/assets/external.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
272 B
Go
Raw Normal View History

2020-01-23 00:35:44 +01:00
// +build !embed
package assets
import (
"net/http"
2020-01-25 02:35:20 +01:00
"sync"
2020-01-23 00:35:44 +01:00
2020-01-25 02:35:20 +01:00
"github.com/navidrome/navidrome/log"
2020-01-23 00:35:44 +01:00
)
2020-01-25 02:35:20 +01:00
var once sync.Once
2020-01-23 00:35:44 +01:00
func AssetFile() http.FileSystem {
2020-01-25 02:35:20 +01:00
once.Do(func() {
log.Warn("Using external assets from 'ui/build' folder")
2020-01-25 02:35:20 +01:00
})
return http.Dir("ui/build")
2020-01-23 00:35:44 +01:00
}