From c07bb6e79a861ecf07eccba04b8b53b8adb46914 Mon Sep 17 00:00:00 2001 From: Genteure Date: Tue, 4 Jun 2019 15:43:07 +0800 Subject: [PATCH] version 1.1.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 开始录制部分的小bug修复 新建文件逻辑修改 --- BililiveRecorder.Core/RecordedRoom.cs | 9 ++++++--- BililiveRecorder.FlvProcessor/FlvStreamProcessor.cs | 7 +++++-- BililiveRecorder.WPF/MainWindow.xaml.cs | 1 + VERSION | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/BililiveRecorder.Core/RecordedRoom.cs b/BililiveRecorder.Core/RecordedRoom.cs index 2994856..cebf6e5 100644 --- a/BililiveRecorder.Core/RecordedRoom.cs +++ b/BililiveRecorder.Core/RecordedRoom.cs @@ -77,6 +77,7 @@ namespace BililiveRecorder.Core private HttpResponseMessage _response; private Stream _stream; private Task StartupTask = null; + private readonly object StartupTaskLock = new object(); public Task StreamDownloadTask = null; public CancellationTokenSource cancellationTokenSource = null; @@ -148,10 +149,12 @@ namespace BililiveRecorder.Core private void StreamMonitor_StreamStatusChanged(object sender, StreamStatusChangedArgs e) { - // if (StartupTask?.IsCompleted ?? true) - if (!IsRecording && (StartupTask?.IsCompleted ?? true)) + lock (StartupTaskLock) { - StartupTask = _StartRecordAsync(); + if (!IsRecording && (StartupTask?.IsCompleted ?? true)) + { + StartupTask = _StartRecordAsync(); + } } } diff --git a/BililiveRecorder.FlvProcessor/FlvStreamProcessor.cs b/BililiveRecorder.FlvProcessor/FlvStreamProcessor.cs index 6e2dfa8..46a7c1e 100644 --- a/BililiveRecorder.FlvProcessor/FlvStreamProcessor.cs +++ b/BililiveRecorder.FlvProcessor/FlvStreamProcessor.cs @@ -88,8 +88,6 @@ namespace BililiveRecorder.FlvProcessor EnabledFeature = enabledFeature; CuttingMode = autoCuttingMode; - if (EnabledFeature.IsRecordEnabled()) { OpenNewRecordFile(); } - return this; } @@ -271,6 +269,11 @@ namespace BililiveRecorder.FlvProcessor } } + if (!(_targetFile?.CanWrite ?? false)) + { + OpenNewRecordFile(); + } + tag.WriteTo(_targetFile, _writeTimeStamp); } void ProcessClipLogic() diff --git a/BililiveRecorder.WPF/MainWindow.xaml.cs b/BililiveRecorder.WPF/MainWindow.xaml.cs index 460952f..5738ff4 100644 --- a/BililiveRecorder.WPF/MainWindow.xaml.cs +++ b/BililiveRecorder.WPF/MainWindow.xaml.cs @@ -35,6 +35,7 @@ namespace BililiveRecorder.WPF { "当前版本:" + BuildInfo.Version, "网站: https://rec.danmuji.org", + "更新日志: https://rec.danmuji.org/allposts", "QQ群: 689636812", "", "【公告】问卷调查", diff --git a/VERSION b/VERSION index a5e4282..9695327 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.9 \ No newline at end of file +1.1.10 \ No newline at end of file