mirror of
https://github.com/owncast/owncast.git
synced 2024-11-23 21:28:29 +03:00
21 lines
501 B
Go
21 lines
501 B
Go
package replays
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/owncast/owncast/core/data"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
// Setup will setup the replay package.
|
|
func Setup() {
|
|
fixUnfinishedStreams()
|
|
}
|
|
|
|
// fixUnfinishedStreams will find streams with no end time and attempt to
|
|
// give them an end time based on the last segment assigned to that stream.
|
|
func fixUnfinishedStreams() {
|
|
if err := data.GetDatastore().GetQueries().FixUnfinishedStreams(context.Background()); err != nil {
|
|
log.Warnln(err)
|
|
}
|
|
}
|