Refactor code structure for improved readability and maintainability
This commit is contained in:
parent
b47641feaa
commit
4f488bae45
78 changed files with 3309 additions and 1570 deletions
35
dotnet/src/TwitchArchive.Core/Config/ToolPathResolver.cs
Normal file
35
dotnet/src/TwitchArchive.Core/Config/ToolPathResolver.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace TwitchArchive.Core.Config
|
||||
{
|
||||
public static class ToolPathResolver
|
||||
{
|
||||
public static string DefaultStreamlinkPath()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return "streamlink.exe";
|
||||
return "/usr/local/bin/streamlink";
|
||||
}
|
||||
|
||||
public static string DefaultFfmpegPath()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return "ffmpeg.exe";
|
||||
return "/usr/bin/ffmpeg";
|
||||
}
|
||||
|
||||
public static string DefaultTwitchDownloaderPath()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return "TwitchDownloaderCLI.exe";
|
||||
return "/app/bin/TwitchDownloaderCLI";
|
||||
}
|
||||
|
||||
public static string DefaultRclonePath()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return "rclone.exe";
|
||||
return "/usr/bin/rclone";
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue