mirror of
https://github.com/datarhei/core.git
synced 2025-09-26 20:11:29 +08:00
Set new FFmpeg version in process config during migration
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
|||||||
.env
|
.env
|
||||||
/core*
|
/core*
|
||||||
/import*
|
/import*
|
||||||
|
/ffmigrate*
|
||||||
/data/**
|
/data/**
|
||||||
/test/**
|
/test/**
|
||||||
.vscode
|
.vscode
|
||||||
|
@@ -129,6 +129,8 @@ func doMigration(logger log.Logger, configstore cfgstore.Store) error {
|
|||||||
|
|
||||||
reRTSP := regexp.MustCompile(`^rtsps?://`)
|
reRTSP := regexp.MustCompile(`^rtsps?://`)
|
||||||
for id, p := range data.Process {
|
for id, p := range data.Process {
|
||||||
|
logger.Info().WithField("processid", p.ID).Log("")
|
||||||
|
|
||||||
for index, input := range p.Config.Input {
|
for index, input := range p.Config.Input {
|
||||||
if !reRTSP.MatchString(input.Address) {
|
if !reRTSP.MatchString(input.Address) {
|
||||||
continue
|
continue
|
||||||
@@ -144,6 +146,7 @@ func doMigration(logger log.Logger, configstore cfgstore.Store) error {
|
|||||||
|
|
||||||
p.Config.Input[index] = input
|
p.Config.Input[index] = input
|
||||||
}
|
}
|
||||||
|
p.Config.FFVersion = version.String()
|
||||||
data.Process[id] = p
|
data.Process[id] = p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user