mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-12-24 11:26:00 +08:00
Cli: Normalize paths
This commit is contained in:
parent
6b9b077a52
commit
fa9cb75c97
|
@ -70,7 +70,7 @@ namespace BililiveRecorder.Cli
|
||||||
|
|
||||||
private static async Task<int> RunConfigModeAsync(RunModeArguments args)
|
private static async Task<int> RunConfigModeAsync(RunModeArguments args)
|
||||||
{
|
{
|
||||||
var path = args.Path;
|
var path = Path.GetFullPath(args.Path);
|
||||||
|
|
||||||
using var logger = BuildLogger(args.LogLevel, args.LogFileLevel);
|
using var logger = BuildLogger(args.LogLevel, args.LogFileLevel);
|
||||||
Log.Logger = logger;
|
Log.Logger = logger;
|
||||||
|
@ -124,13 +124,12 @@ namespace BililiveRecorder.Cli
|
||||||
global.RecordDanmakuGift = danmaku.HasFlag(PortableModeArguments.PortableDanmakuMode.Gift);
|
global.RecordDanmakuGift = danmaku.HasFlag(PortableModeArguments.PortableDanmakuMode.Gift);
|
||||||
global.RecordDanmakuRaw = danmaku.HasFlag(PortableModeArguments.PortableDanmakuMode.RawData);
|
global.RecordDanmakuRaw = danmaku.HasFlag(PortableModeArguments.PortableDanmakuMode.RawData);
|
||||||
|
|
||||||
global.WorkDirectory = args.OutputPath;
|
global.WorkDirectory = Path.GetFullPath(args.OutputPath);
|
||||||
config.Rooms = args.RoomIds.Select(x => new RoomConfig { RoomId = x, AutoRecord = true }).ToList();
|
config.Rooms = args.RoomIds.Select(x => new RoomConfig { RoomId = x, AutoRecord = true }).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
var serviceProvider = BuildServiceProvider(config, logger);
|
var serviceProvider = BuildServiceProvider(config, logger);
|
||||||
|
|
||||||
|
|
||||||
return await RunRecorderAsync(serviceProvider, args.WebBind);
|
return await RunRecorderAsync(serviceProvider, args.WebBind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user