twitch vod downloading done
ffmpeg essentials fix Project reorganized git lfs ffmpeg removed ffmpeg added
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Text.Json.Serialization;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Api
|
||||
{
|
||||
[ConfigurationKeyName("auth")]
|
||||
public Auth Auth { get; set; }
|
||||
|
||||
[ConfigurationKeyName("helix")]
|
||||
public Helix Helix { get; set; }
|
||||
|
||||
[ConfigurationKeyName("gql")]
|
||||
public Gql Gql { get; set; }
|
||||
|
||||
[ConfigurationKeyName("usher")]
|
||||
public Usher Usher { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Auth
|
||||
{
|
||||
[ConfigurationKeyName("token_schema")]
|
||||
public string TokenSchema { get; set; }
|
||||
|
||||
[ConfigurationKeyName("client_id")]
|
||||
public string ClientId { get; set; }
|
||||
|
||||
[ConfigurationKeyName("endpoints")]
|
||||
public EndpointsAuth Endpoints { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
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.Sources.Twitch.Configuration.Models
|
||||
{
|
||||
public class Authentication
|
||||
{
|
||||
[ConfigurationKeyName("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
[ConfigurationKeyName("redirect_url")]
|
||||
public string RedirectUrl { get; set; }
|
||||
|
||||
[ConfigurationKeyName("redirect_url_regex")]
|
||||
public string RedirectUrlRegex { get; set; }
|
||||
|
||||
[ConfigurationKeyName("client_id")]
|
||||
public string ClientId { get; set; }
|
||||
|
||||
[ConfigurationKeyName("response_type")]
|
||||
public string ResponseType { get; set; }
|
||||
|
||||
[ConfigurationKeyName("scopes")]
|
||||
public List<string> Scopes { get; } = new List<string>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Download
|
||||
{
|
||||
[ConfigurationKeyName("vod")]
|
||||
public Vod Vod { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class EndpointsAuth
|
||||
{
|
||||
[ConfigurationKeyName("validate")]
|
||||
public string Validate { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models
|
||||
{
|
||||
public class EndpointsHelix
|
||||
{
|
||||
[ConfigurationKeyName("get_videos")]
|
||||
public string GetVideos { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models
|
||||
{
|
||||
public class EndpointsUsher
|
||||
{
|
||||
[ConfigurationKeyName("get_video_playlist")]
|
||||
public string GetVideoPlaylist { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class GetVideoToken
|
||||
{
|
||||
[ConfigurationKeyName("operation_name")]
|
||||
public string OperationName { get; set; }
|
||||
|
||||
[ConfigurationKeyName("query")]
|
||||
public string Query { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Gql
|
||||
{
|
||||
[ConfigurationKeyName("client_id")]
|
||||
public string ClientId { get; set; }
|
||||
|
||||
[ConfigurationKeyName("endpoint")]
|
||||
public string Endpoint { get; set; }
|
||||
|
||||
[ConfigurationKeyName("queries")]
|
||||
public Queries Queries { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Helix
|
||||
{
|
||||
[ConfigurationKeyName("token_schema")]
|
||||
public string TokenSchema { get; set; }
|
||||
|
||||
[ConfigurationKeyName("client_id")]
|
||||
public string ClientId { get; set; }
|
||||
|
||||
[ConfigurationKeyName("endpoints")]
|
||||
public EndpointsHelix Endpoints { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Queries
|
||||
{
|
||||
[ConfigurationKeyName("get_video_token")]
|
||||
public GetVideoToken GetVideoToken { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Search
|
||||
{
|
||||
[ConfigurationKeyName("general_regexes")]
|
||||
public List<string> GeneralRegexes { get; } = new List<string>();
|
||||
|
||||
[ConfigurationKeyName("vod")]
|
||||
public Vod Vod { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Thumbnail
|
||||
{
|
||||
[ConfigurationKeyName("width")]
|
||||
public int Width { get; set; }
|
||||
|
||||
[ConfigurationKeyName("height")]
|
||||
public int Height { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Usher
|
||||
{
|
||||
[ConfigurationKeyName("endpoints")]
|
||||
public EndpointsUsher Endpoints { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
namespace VDownload.Sources.Twitch.Configuration.Models{
|
||||
|
||||
public class Vod
|
||||
{
|
||||
[ConfigurationKeyName("regexes")]
|
||||
public List<string> Regexes { get; } = new List<string>();
|
||||
|
||||
[ConfigurationKeyName("thumbnail")]
|
||||
public Thumbnail Thumbnail { get; set; }
|
||||
|
||||
[ConfigurationKeyName("stream_playlist_regex")]
|
||||
public string StreamPlaylistRegex { get; set; }
|
||||
|
||||
[ConfigurationKeyName("chunk_regex")]
|
||||
public string ChunkRegex { get; set; }
|
||||
|
||||
[ConfigurationKeyName("file_name")]
|
||||
public string FileName { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiAuthConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public string TokenSchema { get; protected set; }
|
||||
public string ClientId { get; protected set; }
|
||||
public TwitchApiAuthEndpointsConfiguration Endpoints { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiAuthConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
TokenSchema = configuration["token_schema"];
|
||||
ClientId = configuration["client_id"];
|
||||
Endpoints = new TwitchApiAuthEndpointsConfiguration(configuration.GetSection("endpoints"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiAuthEndpointsConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public string Validate { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiAuthEndpointsConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
Validate = configuration["validate"];
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public TwitchApiAuthConfiguration Auth { get; protected set; }
|
||||
public TwitchApiHelixConfiguration Helix { get; protected set; }
|
||||
public TwitchApiGQLConfiguration GQL { get; protected set; }
|
||||
public TwitchApiUsherConfiguration Usher { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
Auth = new TwitchApiAuthConfiguration(configuration.GetSection("auth"));
|
||||
Helix = new TwitchApiHelixConfiguration(configuration.GetSection("helix"));
|
||||
GQL = new TwitchApiGQLConfiguration(configuration.GetSection("gql"));
|
||||
Usher = new TwitchApiUsherConfiguration(configuration.GetSection("usher"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiGQLConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public string ClientId { get; protected set; }
|
||||
public string Endpoint { get; protected set; }
|
||||
public TwitchApiGQLQueriesConfiguration Queries { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiGQLConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
ClientId = configuration["client_id"];
|
||||
Endpoint = configuration["endpoint"];
|
||||
Queries = new TwitchApiGQLQueriesConfiguration(configuration.GetSection("queries"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiGQLQueriesConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public TwitchApiGQLQueriesQueryExtendedConfiguration GetVideoToken { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiGQLQueriesConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
GetVideoToken = new TwitchApiGQLQueriesQueryExtendedConfiguration(configuration.GetSection("get_video_token"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiGQLQueriesQueryConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public string Query { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiGQLQueriesQueryConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
Query = configuration["query"];
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiGQLQueriesQueryExtendedConfiguration : TwitchApiGQLQueriesQueryConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public string OperationName { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiGQLQueriesQueryExtendedConfiguration(IConfigurationSection configuration) : base(configuration)
|
||||
{
|
||||
OperationName = configuration["operation_name"];
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiHelixConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public string TokenSchema { get; protected set; }
|
||||
public string ClientId { get; protected set; }
|
||||
public TwitchApiHelixEndpointsConfiguration Endpoints { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiHelixConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
TokenSchema = configuration["token_schema"];
|
||||
ClientId = configuration["client_id"];
|
||||
Endpoints = new TwitchApiHelixEndpointsConfiguration(configuration.GetSection("endpoints"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiHelixEndpointsConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public string GetVideos { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiHelixEndpointsConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
GetVideos = configuration["get_videos"];
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiUsherConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public TwitchApiUsherEndpointsConfiguration Endpoints { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiUsherConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
Endpoints = new TwitchApiUsherEndpointsConfiguration(configuration.GetSection("endpoints"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchApiUsherEndpointsConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public string GetVideoPlaylist { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchApiUsherEndpointsConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
GetVideoPlaylist = configuration["get_video_playlist"];
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchAuthenticationConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public string Url { get; protected set; }
|
||||
public string RedirectUrl { get; protected set; }
|
||||
public Regex RedirectUrlRegex { get; protected set; }
|
||||
public string ClientId { get; protected set; }
|
||||
public string ResponseType { get; protected set; }
|
||||
public IEnumerable<string> Scopes { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchAuthenticationConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
Url = configuration["url"];
|
||||
RedirectUrl = configuration["redirect_url"];
|
||||
RedirectUrlRegex = new Regex(configuration["redirect_url_regex"]);
|
||||
ClientId = configuration["client_id"];
|
||||
ResponseType = configuration["response_type"];
|
||||
Scopes = configuration.GetSection("scopes").Get<IEnumerable<string>>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,33 +3,24 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using VDownload.Sources.Twitch.Configuration.Models;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
[ConfigurationKeyName("api")]
|
||||
public Api Api { get; set; }
|
||||
|
||||
public TwitchApiConfiguration Api { get; protected set; }
|
||||
public TwitchSearchConfiguration Search { get; protected set; }
|
||||
public TwitchAuthenticationConfiguration Authentication { get; protected set; }
|
||||
[ConfigurationKeyName("search")]
|
||||
public Search Search { get; set; }
|
||||
|
||||
#endregion
|
||||
[ConfigurationKeyName("download")]
|
||||
public Download Download { get; set; }
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
public TwitchConfiguration(IConfiguration configuration)
|
||||
{
|
||||
IConfigurationSection section = configuration.GetSection("sources").GetSection("twitch");
|
||||
Api = new TwitchApiConfiguration(section.GetSection("api"));
|
||||
Search = new TwitchSearchConfiguration(section.GetSection("search"));
|
||||
Authentication = new TwitchAuthenticationConfiguration(section.GetSection("authentication"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
[ConfigurationKeyName("authentication")]
|
||||
public Authentication Authentication { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Sources.Twitch.Configuration
|
||||
{
|
||||
public class TwitchSearchConfiguration
|
||||
{
|
||||
#region PROPERTIES
|
||||
|
||||
public IEnumerable<Regex> GeneralRegexes { get; protected set; }
|
||||
public IEnumerable<Regex> VodRegexes { get; protected set; }
|
||||
public Regex VodStreamPlaylistRegex { get; protected set; }
|
||||
public int VodThumbnailWidth { get; protected set; }
|
||||
public int VodThumbnailHeight { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region CONSTRUCTORS
|
||||
|
||||
internal TwitchSearchConfiguration(IConfigurationSection configuration)
|
||||
{
|
||||
GeneralRegexes = configuration.GetSection("general_regexes").Get<IEnumerable<string>>().Select(x => new Regex(x));
|
||||
VodRegexes = configuration.GetSection("vod_regexes").Get<IEnumerable<string>>().Select(x => new Regex(x));
|
||||
VodStreamPlaylistRegex = new Regex(configuration["vod_stream_playlist_regex"]);
|
||||
VodThumbnailWidth = int.Parse(configuration["vod_thumbnail_width"]);
|
||||
VodThumbnailHeight = int.Parse(configuration["vod_thumbnail_height"]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user