diff --git a/Core/RuntimeObject/Danmu.cs b/Core/RuntimeObject/Danmu.cs index 9f87f8db..1e340323 100644 --- a/Core/RuntimeObject/Danmu.cs +++ b/Core/RuntimeObject/Danmu.cs @@ -206,7 +206,9 @@ public static void SevaDanmu(LiveChat.LiveChatListener liveChatListener, bool De /// 保存路径 /// 昵称 /// 房间号 - public static FileInfo SevaDanmu(List danmuInfo, string FileName, string Name, long roomId) + /// 是否为临时保存(不删除记录) + /// + public static FileInfo SevaDanmu(List danmuInfo, string FileName, string Name, long roomId,bool IsTemporary= false) { string XML = string.Empty; XML = "" + diff --git a/Core/RuntimeObject/Download/HLS.cs b/Core/RuntimeObject/Download/HLS.cs index 14f976e3..144b5b41 100644 --- a/Core/RuntimeObject/Download/HLS.cs +++ b/Core/RuntimeObject/Download/HLS.cs @@ -237,29 +237,45 @@ private static DlwnloadTaskState HandleHlsError(RoomCardClass card, HostClass ho { return DlwnloadTaskState.StopLive; } - if(card.DownInfo.Unmark) + + if (card.DownInfo.Unmark) { return DlwnloadTaskState.UserCancellation; } - //是否为收费直播 + // bool isPaidLiveStream = hostClass.all_special_types.Contains(1); + string url = string.Empty; + + //是否为收费直播 if (isPaidLiveStream) - { - card.DownInfo.Status = RoomCardClass.DownloadStatus.Special; - return DlwnloadTaskState.PaidLiveStream; + { + //测是否有门票 + if (!GetHlsAvcUrl(card, Core.Config.Core_RunConfig._DefaultResolution, out url)) + { + //没门票 + card.DownInfo.Status = RoomCardClass.DownloadStatus.Special; + return DlwnloadTaskState.PaidLiveStream; + } + //有门票 + if (!string.IsNullOrEmpty(url)) + { + Log.Info(nameof(HandleHlsError), $"[{card.Name}({card.RoomId})]检测到收费直播,但是好像有门票,继续尝试录制"); + } } + //是否有HLS流 if (hostClass.Effective) { - card.DownInfo.Status = RoomCardClass.DownloadStatus.Downloading; + card.DownInfo.Status = RoomCardClass.DownloadStatus.Downloading; return DlwnloadTaskState.Default; } else { - card.DownInfo.Status = RoomCardClass.DownloadStatus.Standby; + card.DownInfo.Status = RoomCardClass.DownloadStatus.Standby; return DlwnloadTaskState.NoHLSStreamExists; } } + /// /// 更新下载速度 ///