mirror of
https://github.com/owncast/owncast.git
synced 2024-11-27 09:45:36 +03:00
22 lines
501 B
Go
22 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)
|
||
|
}
|
||
|
}
|