twitch vod downloading done
ffmpeg essentials fix Project reorganized git lfs ffmpeg removed ffmpeg added
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Text.Json.Serialization;
|
||||
using VDownload.Services.Data.Configuration.Models;
|
||||
|
||||
namespace VDownload.Services.Data.Configuration
|
||||
{
|
||||
public class CommonConfiguration
|
||||
{
|
||||
[ConfigurationKeyName("path")]
|
||||
public Models.Path Path { get; set; }
|
||||
|
||||
[ConfigurationKeyName("processing")]
|
||||
public Processing Processing { get; set; }
|
||||
|
||||
[ConfigurationKeyName("string_resources_assembly")]
|
||||
public string StringResourcesAssembly { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VDownload.Sources.Twitch.Configuration;
|
||||
|
||||
namespace VDownload.Services.Data.Configuration
|
||||
{
|
||||
public interface IConfigurationService
|
||||
{
|
||||
CommonConfiguration Common { get; }
|
||||
TwitchConfiguration Twitch { get; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class ConfigurationService : IConfigurationService
|
||||
{
|
||||
#region SERVICES
|
||||
|
||||
protected readonly IConfiguration _configuration;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region PROPERTIES
|
||||
|
||||
public CommonConfiguration Common { get; protected set; }
|
||||
public TwitchConfiguration Twitch { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public ConfigurationService(IConfiguration configuration)
|
||||
{
|
||||
Common = configuration.GetSection("common").Get<CommonConfiguration>()!;
|
||||
Twitch = configuration.GetSection("twitch").Get<TwitchConfiguration>()!;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Services.Data.Configuration.Models
|
||||
{
|
||||
public class Appdata
|
||||
{
|
||||
[ConfigurationKeyName("directory_name")]
|
||||
public string DirectoryName { get; set; }
|
||||
|
||||
[ConfigurationKeyName("authentication_file")]
|
||||
public string AuthenticationFile { get; set; }
|
||||
|
||||
[ConfigurationKeyName("settings_file")]
|
||||
public string SettingsFile { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Services.Data.Configuration.Models
|
||||
{
|
||||
public class Muxer
|
||||
{
|
||||
[ConfigurationKeyName("extension")]
|
||||
public string Extension { get; set; }
|
||||
|
||||
[ConfigurationKeyName("video_codecs")]
|
||||
public List<string> VideoCodecs { get; } = new List<string>();
|
||||
|
||||
[ConfigurationKeyName("audio_codecs")]
|
||||
public List<string> AudioCodecs { get; } = new List<string>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Services.Data.Configuration.Models
|
||||
{
|
||||
public class Path
|
||||
{
|
||||
[ConfigurationKeyName("appdata")]
|
||||
public Appdata Appdata { get; set; }
|
||||
|
||||
[ConfigurationKeyName("temp")]
|
||||
public Temp Temp { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Services.Data.Configuration.Models
|
||||
{
|
||||
public class Processing
|
||||
{
|
||||
[ConfigurationKeyName("muxers")]
|
||||
public List<Muxer> Muxers { get; } = new List<Muxer>();
|
||||
|
||||
[ConfigurationKeyName("processed_filename")]
|
||||
public string ProcessedFilename { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Services.Data.Configuration.Models
|
||||
{
|
||||
public class Temp
|
||||
{
|
||||
[ConfigurationKeyName("tasks_directory")]
|
||||
public string TasksDirectory { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\VDownload.Sources\VDownload.Sources.Twitch\VDownload.Sources.Twitch.Configuration\VDownload.Sources.Twitch.Configuration.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user