diff options
Diffstat (limited to 'recording')
-rw-r--r-- | recording/config.go | 12 | ||||
-rw-r--r-- | recording/runner.go | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/recording/config.go b/recording/config.go index 9a95e62..52406f3 100644 --- a/recording/config.go +++ b/recording/config.go @@ -2,21 +2,21 @@ package recording import ( "fmt" - "github.com/keuin/slbr/bilibili" + "github.com/keuin/slbr/types" ) type TaskConfig struct { - RoomId bilibili.RoomId `mapstructure:"room_id"` + RoomId types.RoomId `mapstructure:"room_id"` Transport TransportConfig `mapstructure:"transport"` Download DownloadConfig `mapstructure:"download"` Watch WatchConfig `mapstructure:"watch"` } type TransportConfig struct { - SocketTimeoutSeconds int `mapstructure:"socket_timeout_seconds"` - RetryIntervalSeconds int `mapstructure:"retry_interval_seconds"` - MaxRetryTimes int `mapstructure:"max_retry_times"` - AllowedNetworkTypes []bilibili.IpNetType `mapstructure:"allowed_network_types"` + SocketTimeoutSeconds int `mapstructure:"socket_timeout_seconds"` + RetryIntervalSeconds int `mapstructure:"retry_interval_seconds"` + MaxRetryTimes int `mapstructure:"max_retry_times"` + AllowedNetworkTypes []types.IpNetType `mapstructure:"allowed_network_types"` } type DownloadConfig struct { diff --git a/recording/runner.go b/recording/runner.go index 13a4050..936fcab 100644 --- a/recording/runner.go +++ b/recording/runner.go @@ -15,6 +15,7 @@ import ( "github.com/keuin/slbr/common/files" "github.com/keuin/slbr/common/myurl" "github.com/keuin/slbr/logging" + "github.com/keuin/slbr/types" "github.com/samber/mo" "io" "os" @@ -250,7 +251,7 @@ func record( ctx, logger, task, - func() (bilibili.RoomProfileResponse, error) { + func() (types.RoomProfileResponse, error) { return bi.GetRoomProfile(task.RoomId) }, ) @@ -266,7 +267,7 @@ func record( ctx, logger, task, - func() (bilibili.RoomUrlInfoResponse, error) { + func() (types.RoomUrlInfoResponse, error) { return bi.GetStreamingInfo(task.RoomId) }, ) |