mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
30 lines
825 B
C#
30 lines
825 B
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace BililiveRecorder.Core
|
|
{
|
|
public class RecordInfo
|
|
{
|
|
private static readonly Random random = new Random();
|
|
|
|
public string SavePath;
|
|
|
|
public string StreamFilePrefix = "录制";
|
|
public string ClipFilePrefix = "剪辑";
|
|
|
|
public string StreamName = "某直播间";
|
|
|
|
public string GetStreamFilePath()
|
|
=> Path.Combine(SavePath, $@"{StreamFilePrefix}-{StreamName}-{DateTime.Now.ToString("yyyyMMddHHmmss")}-{random.Next(100, 999)}.flv");
|
|
|
|
public string GetClipFilePath()
|
|
=> Path.Combine(SavePath, $@"{ClipFilePrefix}-{StreamName}-{DateTime.Now.ToString("yyyyMMddHHmmss")}-{random.Next(100, 999)}.flv");
|
|
|
|
public RecordInfo(string name)
|
|
{
|
|
StreamName = name;
|
|
}
|
|
|
|
}
|
|
}
|