mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 03:32:20 +08:00
commit
815189c645
|
@ -12,9 +12,9 @@ namespace BililiveRecorder.Cli
|
|||
{
|
||||
internal class Program
|
||||
{
|
||||
private static int Main()
|
||||
private static int Main(string[] args)
|
||||
=> Parser.Default
|
||||
.ParseArguments<CmdVerbConfigMode, CmdVerbPortableMode>(Environment.GetCommandLineArgs())
|
||||
.ParseArguments<CmdVerbConfigMode, CmdVerbPortableMode>(args)
|
||||
.MapResult<CmdVerbConfigMode, CmdVerbPortableMode, int>(RunConfigMode, RunPortableMode, err => 1);
|
||||
|
||||
private static int RunConfigMode(CmdVerbConfigMode opts)
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace BililiveRecorder.FlvProcessor
|
|||
if (this.CuttingMode != AutoCuttingMode.Disabled && tag.IsVideoKeyframe)
|
||||
{
|
||||
bool byTime = (this.CuttingMode == AutoCuttingMode.ByTime) && (this.CurrentMaxTimestamp / 1000 >= this.CuttingNumber * 60);
|
||||
bool bySize = (this.CuttingMode == AutoCuttingMode.BySize) && ((this._targetFile.Length / 1024 / 1024) >= this.CuttingNumber);
|
||||
bool bySize = (this.CuttingMode == AutoCuttingMode.BySize) && (((this._targetFile?.Length ?? 0) / 1024 / 1024) >= this.CuttingNumber);
|
||||
if (byTime || bySize)
|
||||
{
|
||||
this.FinallizeCurrentFile();
|
||||
|
|
|
@ -87,8 +87,9 @@ namespace BililiveRecorder.WPF
|
|||
|
||||
private void Application_SessionEnding(object sender, SessionEndingCancelEventArgs e)
|
||||
{
|
||||
if (e != null)
|
||||
e.Cancel = true;
|
||||
(Current.MainWindow as NewMainWindow).CloseWithoutConfirmAction();
|
||||
(Current.MainWindow as NewMainWindow)?.CloseWithoutConfirmAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
<attribute name='pid' layout='${processid}'/>
|
||||
<attribute name='logger' layout='${logger}'/>
|
||||
<attribute name='roomid' layout='${event-properties:item=roomid}'/>
|
||||
<attribute name='message' layout='${message}'/>
|
||||
<attribute name='exception' encode='false'>
|
||||
<attribute name='message' escapeUnicode="false" layout='${message}'/>
|
||||
<attribute name='exception' escapeUnicode="false" encode='false'>
|
||||
<layout xsi:type='JsonLayout'>
|
||||
<attribute name='type' layout='${exception:format=Type}'/>
|
||||
<attribute name='message' layout='${exception:format=Message}'/>
|
||||
<attribute name='tostring' layout='${exception:format=ToString}'/>
|
||||
<attribute name='type' escapeUnicode="false" layout='${exception:format=Type}'/>
|
||||
<attribute name='message' escapeUnicode="false" layout='${exception:format=Message}'/>
|
||||
<attribute name='tostring' escapeUnicode="false" layout='${exception:format=ToString}'/>
|
||||
</layout>
|
||||
</attribute>
|
||||
</layout>
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
<attribute name='pid' layout='${processid}'/>
|
||||
<attribute name='logger' layout='${logger}'/>
|
||||
<attribute name='roomid' layout='${event-properties:item=roomid}'/>
|
||||
<attribute name='message' layout='${message}'/>
|
||||
<attribute name='exception' encode='false'>
|
||||
<attribute name='message' escapeUnicode="false" layout='${message}'/>
|
||||
<attribute name='exception' escapeUnicode="false" encode='false'>
|
||||
<layout xsi:type='JsonLayout'>
|
||||
<attribute name='type' layout='${exception:format=Type}'/>
|
||||
<attribute name='message' layout='${exception:format=Message}'/>
|
||||
<attribute name='tostring' layout='${exception:format=ToString}'/>
|
||||
<attribute name='type' escapeUnicode="false" layout='${exception:format=Type}'/>
|
||||
<attribute name='message' escapeUnicode="false" layout='${exception:format=Message}'/>
|
||||
<attribute name='tostring' escapeUnicode="false" layout='${exception:format=ToString}'/>
|
||||
</layout>
|
||||
</attribute>
|
||||
</layout>
|
||||
|
|
|
@ -110,6 +110,8 @@ namespace BililiveRecorder.WPF.Pages
|
|||
private async void RoomCard_DeleteRequested(object sender, EventArgs e)
|
||||
{
|
||||
if (this.DataContext is IRecorder rec && sender is IRecordedRoom room)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dialog = new DeleteRoomConfirmDialog
|
||||
{
|
||||
|
@ -124,6 +126,8 @@ namespace BililiveRecorder.WPF.Pages
|
|||
rec.SaveConfigToFile();
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
|
||||
private async void RoomCard_ShowSettingsRequested(object sender, EventArgs e)
|
||||
|
@ -148,26 +152,42 @@ namespace BililiveRecorder.WPF.Pages
|
|||
roomid = result2;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
await new AddRoomFailedDialog { DataContext = AddRoomFailedDialog.AddRoomFailedErrorText.InvalidInput }.ShowAsync();
|
||||
}
|
||||
catch (Exception) { }
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (roomid < 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
await new AddRoomFailedDialog { DataContext = AddRoomFailedDialog.AddRoomFailedErrorText.RoomIdNegative }.ShowAsync();
|
||||
}
|
||||
catch (Exception) { }
|
||||
return;
|
||||
}
|
||||
else if (roomid == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
await new AddRoomFailedDialog { DataContext = AddRoomFailedDialog.AddRoomFailedErrorText.RoomIdZero }.ShowAsync();
|
||||
}
|
||||
catch (Exception) { }
|
||||
return;
|
||||
}
|
||||
|
||||
if (rec.Any(x => x.RoomId == roomid || x.ShortRoomId == roomid))
|
||||
{
|
||||
try
|
||||
{
|
||||
await new AddRoomFailedDialog { DataContext = AddRoomFailedDialog.AddRoomFailedErrorText.Duplicate }.ShowAsync();
|
||||
}
|
||||
catch (Exception) { }
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@
|
|||
<value>監視</value>
|
||||
</data>
|
||||
<data name="RoomListPage_Menu_AutoRecord_DisableAll" xml:space="preserve">
|
||||
<value>すべてのチャンネルの自動録画を停止する</value>
|
||||
<value>すべての配信ルームの自動録画機能をキャンセル</value>
|
||||
</data>
|
||||
<data name="RoomListPage_Menu_AutoRecord_EnableAll" xml:space="preserve">
|
||||
<value>すべての配信ルームの自動録画機能を起動</value>
|
||||
|
|
Loading…
Reference in New Issue
Block a user