From a44ad2830b3a176951aa55a4f499dcd3c72208e6 Mon Sep 17 00:00:00 2001 From: langhuihui <178529795@qq.com> Date: Tue, 2 Apr 2024 15:56:36 +0800 Subject: [PATCH] fix: pull save --- plugin.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin.go b/plugin.go index 7a11651..207c618 100644 --- a/plugin.go +++ b/plugin.go @@ -285,6 +285,10 @@ func (opt *Plugin) Pull(streamPath string, url string, puller IPuller, save int) pullConf.PullOnStartLocker.Lock() defer pullConf.PullOnStartLocker.Unlock() m := map[string]string{streamPath: url} + for id := range pullConf.PullOnStart { + m[id] = pullConf.PullOnStart[id] + } + m[streamPath] = url opt.RawConfig.ParseModifyFile(map[string]any{ "pull": map[string]any{ "pullonstart": m, @@ -297,6 +301,8 @@ func (opt *Plugin) Pull(streamPath string, url string, puller IPuller, save int) for id := range pullConf.PullOnSub { m[id] = pullConf.PullOnSub[id] } + m[streamPath] = url + pullConf.PullOnSub[streamPath] = url opt.RawConfig.ParseModifyFile(map[string]any{ "pull": map[string]any{ "pullonsub": m,