diff options
author | Keuin <[email protected]> | 2022-09-08 13:27:37 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-09-08 13:27:37 +0800 |
commit | 177ecb3de2f9ca8e23c3eeb19b6875a0c6593355 (patch) | |
tree | 6a8d82c994317420f2294ac3678c497d596cc1fb /recording/runner.go | |
parent | ea58d5d3c9f0d4534a9ffd028b9461a75922d54f (diff) |
Support specify IP network type (ipv4, ipv6, in arbitrary combination and priority)
Diffstat (limited to 'recording/runner.go')
-rw-r--r-- | recording/runner.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/recording/runner.go b/recording/runner.go index 4fd9b46..974fa0e 100644 --- a/recording/runner.go +++ b/recording/runner.go @@ -42,7 +42,9 @@ func RunTask(ctx context.Context, wg *sync.WaitGroup, task *TaskConfig) { // doTask do the actual work, but returns synchronously. func doTask(ctx context.Context, task *TaskConfig) error { logger := log.Default() - bi := bilibili.NewBilibili() + netTypes := task.Transport.AllowedNetworkTypes + logger.Printf("Network types: %v", netTypes) + bi := bilibili.NewBilibiliWithNetType(netTypes) logger.Printf("Start task: room %v", task.RoomId) authKey, url, err := getStreamingServer(task, logger, bi) @@ -143,6 +145,7 @@ func record( return } + logger.Printf("INFO: Getting stream url...") urlInfo, err := common.AutoRetry( ctx, func() (bilibili.RoomUrlInfoResponse, error) { |