2018-03-20 00:12:32 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace BililiveRecorder.Core
|
|
|
|
|
{
|
|
|
|
|
public class RecordInfo
|
|
|
|
|
{
|
|
|
|
|
private static readonly Random random = new Random();
|
|
|
|
|
|
2018-03-21 20:56:56 +08:00
|
|
|
|
public string SavePath;
|
2018-03-20 00:12:32 +08:00
|
|
|
|
|
|
|
|
|
public string StreamFilePrefix = "录制";
|
2018-03-24 08:34:57 +08:00
|
|
|
|
public string ClipFilePrefix = "剪辑";
|
2018-03-20 00:12:32 +08:00
|
|
|
|
|
|
|
|
|
public string StreamName = "某直播间";
|
|
|
|
|
|
|
|
|
|
public string GetStreamFilePath()
|
2018-03-21 20:56:56 +08:00
|
|
|
|
=> Path.Combine(SavePath, $@"{StreamFilePrefix}-{StreamName}-{DateTime.Now.ToString("yyyyMMddHHmmss")}-{random.Next(100, 999)}.flv");
|
2018-03-20 00:12:32 +08:00
|
|
|
|
|
|
|
|
|
public string GetClipFilePath()
|
2018-03-21 20:56:56 +08:00
|
|
|
|
=> Path.Combine(SavePath, $@"{ClipFilePrefix}-{StreamName}-{DateTime.Now.ToString("yyyyMMddHHmmss")}-{random.Next(100, 999)}.flv");
|
2018-03-20 00:12:32 +08:00
|
|
|
|
|
2018-03-21 20:56:56 +08:00
|
|
|
|
public RecordInfo(string name)
|
|
|
|
|
{
|
|
|
|
|
StreamName = name;
|
|
|
|
|
}
|
2018-03-20 00:12:32 +08:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|