filename templates added
This commit is contained in:
@@ -6,6 +6,9 @@ namespace VDownload.Services.Data.Configuration
|
||||
{
|
||||
public class CommonConfiguration
|
||||
{
|
||||
[ConfigurationKeyName("filename_templates")]
|
||||
public IEnumerable<FilenameTemplate> FilenameTemplates { get; set; }
|
||||
|
||||
[ConfigurationKeyName("path")]
|
||||
public Models.Path Path { get; set; }
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VDownload.Services.Data.Configuration.Models
|
||||
{
|
||||
public class FilenameTemplate
|
||||
{
|
||||
[ConfigurationKeyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[ConfigurationKeyName("wildcard")]
|
||||
public string Wildcard { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,9 @@ namespace VDownload.Services.Data.Settings.Models
|
||||
[JsonProperty("default_audio_extension")]
|
||||
public AudioExtension DefaultAudioExtension { get; set; } = AudioExtension.MP3;
|
||||
|
||||
[JsonProperty("filename_template")]
|
||||
public string FilenameTemplate { get; set; } = "{title}";
|
||||
|
||||
[JsonProperty("default_output_directory")]
|
||||
public string DefaultOutputDirectory { get; set; } = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user