From c5669a2ba16f6a6fef431285c9c1659b0b2f3423 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 12 Feb 2023 20:30:13 +0800 Subject: [PATCH] fix: ck list init empty error --- CHANGELOG.md | 4 +++- common.props | 2 +- docker/README.md | 2 +- docker/install.sh | 14 +++++++++----- .../Extensions/ServiceCollectionExtension.cs | 4 ++-- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d7b15df1..0f7b065b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -91,4 +91,6 @@ - Fix #228 : Try to fix sharing video error - Feature: Change default docker image from dockerhub to github ## 0.4.5 -- Fix #423 : Change int to string to avoid overflow exception \ No newline at end of file +- Fix #423 : Change int to string to avoid overflow exception +## 0.4.6 +- Fix : ck list init empty error \ No newline at end of file diff --git a/common.props b/common.props index 314af312e..e1a1569dd 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ Ray - 0.4.5 + 0.4.6 $(NoWarn);CS1591;CS0436 diff --git a/docker/README.md b/docker/README.md index 3bf6510c0..7df2310ab 100644 --- a/docker/README.md +++ b/docker/README.md @@ -31,7 +31,7 @@ Window系统推荐使用Docker Desktop,官方下载安装包安装。 仅支持linux系统 ``` -wget "https://ghproxy.com/https://raw.githubusercontent.com/RayWangQvQ/BiliBiliToolPro/feature/docker-workflow/docker/install.sh" && chmod +x insatll.sh && install.sh +wget "https://ghproxy.com/https://raw.githubusercontent.com/RayWangQvQ/BiliBiliToolPro/main/docker/install.sh" && chmod +x install.sh && ./install.sh ``` ## 3. 方式二:手动Docker Compose diff --git a/docker/install.sh b/docker/install.sh index 6ccc275d1..a3f8695b0 100644 --- a/docker/install.sh +++ b/docker/install.sh @@ -2,8 +2,8 @@ ### # @Author: Ray zai7lou@outlook.com # @Date: 2023-02-11 23:13:19 -# @LastEditors: Ray zai7lou@outlook.com -# @LastEditTime: 2023-02-12 18:30:10 + # @LastEditors: Ray zai7lou@outlook.com + # @LastEditTime: 2023-02-12 20:18:04 # @FilePath: \BiliBiliToolPro\docker\install.sh # @Description: ### @@ -34,10 +34,11 @@ base_dir="/bili" remote_compose_url="${githubProxy}https://raw.githubusercontent.com/RayWangQvQ/BiliBiliToolPro/main/docker/sample/docker-compose.yml" remote_config_url="${githubProxy}https://raw.githubusercontent.com/RayWangQvQ/BiliBiliToolPro/main/src/Ray.BiliBiliTool.Console/appsettings.json" remote_ckJson_url="${githubProxy}https://raw.githubusercontent.com/RayWangQvQ/BiliBiliToolPro/main/docker/sample/cookies.json" +docker_img_name="ghcr.io/raywangqvq/bilibili_tool_pro" createBaseDir() { eval $invocation - [ -f $base_dir ] || mkdir $base_dir + mkdir -p $base_dir cd $base_dir } @@ -82,18 +83,21 @@ downloadResources() { runContainer() { eval $invocation + + say_info "开始拉取镜像" + docker pull $docker_img_name + say_info "开始运行容器" { docker compose version && docker compose up -d } || { docker-compose version && docker-compose up -d } || { - docker pull zai7lou/bilibili_tool_pro docker run -d --name="bili" \ -v $base_dir/Logs:/app/Logs \ -v $base_dir/appsettings.json:/app/appsettings.json \ -v $base_dir/cookies.json:/app/cookies.json \ - ghcr.io/raywangqvq/bilibili_tool_pro + $docker_img_name } || { say_err "创建容器失败,请检查" exit 1 diff --git a/src/Ray.BiliBiliTool.Agent/Extensions/ServiceCollectionExtension.cs b/src/Ray.BiliBiliTool.Agent/Extensions/ServiceCollectionExtension.cs index edd563dcb..9b6d1a9a2 100644 --- a/src/Ray.BiliBiliTool.Agent/Extensions/ServiceCollectionExtension.cs +++ b/src/Ray.BiliBiliTool.Agent/Extensions/ServiceCollectionExtension.cs @@ -37,7 +37,7 @@ public static IServiceCollection AddBiliBiliClientApi(this IServiceCollection se if (!string.IsNullOrWhiteSpace(old)) list.Add(old); var configList = config.GetSection("BiliBiliCookies") - .Get>() + .Get>() ?? new List() .Where(x => !string.IsNullOrWhiteSpace(x)) .ToList(); list.AddRange(configList); @@ -75,7 +75,7 @@ public static IServiceCollection AddBiliBiliClientApi(this IServiceCollection se services.AddBiliBiliClientApi("https://live-trace.bilibili.com"); //qinglong - var qinglongHost = configuration["QL_URL"]?? "http://localhost:5600"; + var qinglongHost = configuration["QL_URL"] ?? "http://localhost:5600"; services .AddHttpApi(o => {