Skip to content

Commit

Permalink
修复由于弹幕录制逻辑的问题,导致录制结束和取消录制失败的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CHKZL committed Jul 24, 2024
1 parent def9165 commit 4e13cc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Core/RuntimeObject/Download/Basics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ internal static async Task HandleRecordingAsync(RoomCardClass roomCard, List<Tri
break;
}

if (roomCard.IsRecDanmu)
if (roomCard.IsRecDanmu && roomCard.DownInfo.LiveChatListener != null)
{
roomCard.DownInfo.LiveChatListener.File = result.FileName.Replace("_original.mp4", "").Replace("_original.flv", "");
Danmu.SevaDanmu(roomCard.DownInfo.LiveChatListener, result.TaskState == DlwnloadTaskState.SuccessfulButNotStream ? true : false, ref roomCard);
Expand Down
5 changes: 4 additions & 1 deletion Core/RuntimeObject/RoomInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ public static bool ModifyRoomSettings(long UID, bool AutoRec, bool Remind, bool
{
try
{
ModifyRecordingSettings(new List<long> { UID }, AutoRec, IsAdd);
//设置开播提示
ModifyRoomPromptSettings(new List<long> { UID }, Remind, IsAdd);
//设置弹幕录制
ModifyRoomDmSettings(new List<long> { UID }, RecDanmu, IsAdd);
//设置录制模式
ModifyRecordingSettings(new List<long> { UID }, AutoRec, IsAdd);
return true;
}
catch (Exception e)
Expand Down

0 comments on commit 4e13cc9

Please sign in to comment.