You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
501 B
21 lines
501 B
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) |
|
} |
|
}
|
|
|