From 635a24387529f657fde32201af5cc635c088eed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A4=E4=B9=8B=E7=95=8C?= Date: Thu, 17 Oct 2024 15:09:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=8B=A5=E9=8C=84=E5=BD=B1=E7=B5=90?= =?UTF-8?q?=E6=9D=9F=E4=BD=86=E9=82=84=E6=B2=92=E7=B5=90=E6=9D=9F=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E5=89=87=E4=B8=8D=E5=88=AA=E9=99=A4=E5=AE=B9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- StreamRecordTools/Command/Record/YouTube.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/StreamRecordTools/Command/Record/YouTube.cs b/StreamRecordTools/Command/Record/YouTube.cs index 1ce8f93..8496207 100644 --- a/StreamRecordTools/Command/Record/YouTube.cs +++ b/StreamRecordTools/Command/Record/YouTube.cs @@ -355,9 +355,16 @@ public static async Task StartRecord(string id, Log.Info("將直播轉移至保存點"); MoveVideo(outputPath, "youtube.endstream"); - // https://social.msdn.microsoft.com/Forums/en-US/c2c12a9f-dc4c-4c9a-b652-65374ef999d8/get-docker-container-id-in-code?forum=aspdotnetcore - if (Utility.InDocker && !isDisableRedis) - Utility.Redis.GetSubscriber().Publish(new("streamTools.removeById", RedisChannel.PatternMode.Literal), Environment.MachineName); + if (Utility.IsLiveEnd(videoId, false, isDisableRedis)) + { + // https://social.msdn.microsoft.com/Forums/en-US/c2c12a9f-dc4c-4c9a-b652-65374ef999d8/get-docker-container-id-in-code?forum=aspdotnetcore + if (Utility.InDocker && !isDisableRedis) + Utility.Redis.GetSubscriber().Publish(new("streamTools.removeById", RedisChannel.PatternMode.Literal), Environment.MachineName); + } + else + { + Log.Warn("還沒關台,保留容器以供紀錄檢查"); + } } } else