mirror of
https://github.com/owncast/owncast.git
synced 2025-11-03 21:08:36 +08:00
Support using the custom video serving endpoint even if you don't use object storage (#2924)
* feat(video): refactor video serving endpoint It can now be used without an object storage provider. Closes #2785 * fix: remove debug log
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
datastoreValuesVersion = 2
|
||||
datastoreValuesVersion = 3
|
||||
datastoreValueVersionKey = "DATA_STORE_VERSION"
|
||||
)
|
||||
|
||||
@ -25,6 +25,8 @@ func migrateDatastoreValues(datastore *Datastore) {
|
||||
migrateToDatastoreValues1(datastore)
|
||||
case 1:
|
||||
migrateToDatastoreValues2(datastore)
|
||||
case 2:
|
||||
migrateToDatastoreValues3ServingEndpoint3(datastore)
|
||||
default:
|
||||
log.Fatalln("missing datastore values migration step")
|
||||
}
|
||||
@ -61,3 +63,13 @@ func migrateToDatastoreValues2(datastore *Datastore) {
|
||||
{Key: oldAdminPassword, Comment: "Default stream key"},
|
||||
})
|
||||
}
|
||||
|
||||
func migrateToDatastoreValues3ServingEndpoint3(_ *Datastore) {
|
||||
s3Config := GetS3Config()
|
||||
|
||||
if !s3Config.Enabled {
|
||||
return
|
||||
}
|
||||
|
||||
_ = SetVideoServingEndpoint(s3Config.ServingEndpoint)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user