navidrome/assets/external.go

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

19 lines
269 B
Go
Raw Normal View History

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