mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 21:03:19 +03:00
487bd12444
* First pass at restructuring the project; untested but it does compile
* Restructure builds and runs 🎉
* Add the dist folder to the gitignore
* Update core/playlist/monitor.go
* golint and reorganize the monitor.go file
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
31 lines
599 B
Go
31 lines
599 B
Go
package core
|
|
|
|
import (
|
|
"github.com/gabek/owncast/config"
|
|
"github.com/gabek/owncast/core/playlist"
|
|
"github.com/gabek/owncast/core/storageproviders"
|
|
)
|
|
|
|
var (
|
|
usingExternalStorage = false
|
|
)
|
|
|
|
func setupStorage() error {
|
|
if config.Config.IPFS.Enabled {
|
|
_storage = &storageproviders.IPFSStorage{}
|
|
usingExternalStorage = true
|
|
} else if config.Config.S3.Enabled {
|
|
_storage = &storageproviders.S3Storage{}
|
|
usingExternalStorage = true
|
|
}
|
|
|
|
if usingExternalStorage {
|
|
if err := _storage.Setup(); err != nil {
|
|
return err
|
|
}
|
|
|
|
go playlist.StartVideoContentMonitor(_storage)
|
|
}
|
|
|
|
return nil
|
|
}
|