files moved
This commit is contained in:
parent
0443cc6527
commit
639a7dd0cf
@ -4,7 +4,6 @@ using DTLib.Dtsod;
|
||||
using System.IO;
|
||||
using VkAudioDownloader;
|
||||
using DTLib.Logging.New;
|
||||
using VkAudioDownloader.VkM3U8;
|
||||
|
||||
if(!File.Exists("config.dtsod"))
|
||||
{
|
||||
@ -18,6 +17,7 @@ var logger = new CompositeLogger(new DefaultLogFormat(true),
|
||||
new ConsoleLogger(),
|
||||
new FileLogger("logs", "VkAudioDownloaer"));
|
||||
var _logger = new LoggerContext(logger, "main");
|
||||
_logger.LogDebug("DEBUG LOG ENABLED");
|
||||
|
||||
try
|
||||
{
|
||||
@ -25,8 +25,8 @@ try
|
||||
AudioAesDecryptor.TestAes();
|
||||
#endif
|
||||
|
||||
_logger.LogInfo("initializing api...");
|
||||
var client = new VkClient(config, logger);
|
||||
_logger.LogDebug("initializing api...");
|
||||
await client.ConnectAsync();
|
||||
|
||||
// getting audio from vk
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using DTLib.Filesystem;
|
||||
using Stream = System.IO.Stream;
|
||||
|
||||
namespace VkAudioDownloader.VkM3U8;
|
||||
namespace VkAudioDownloader;
|
||||
|
||||
public class AudioAesDecryptor : IDisposable
|
||||
{
|
||||
@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using VkNet.Model.Attachments;
|
||||
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using CliWrap;
|
||||
using DTLib.Filesystem;
|
||||
using DTLib.Extensions;
|
||||
using DTLib.Logging.New;
|
||||
|
||||
namespace VkAudioDownloader;
|
||||
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
global using System.Threading.Tasks;
|
||||
using System.Net.Http;
|
||||
using DTLib.Filesystem;
|
||||
using VkAudioDownloader.VkM3U8;
|
||||
using Stream = System.IO.Stream;
|
||||
|
||||
|
||||
namespace VkAudioDownloader.VkM3U8;
|
||||
namespace VkAudioDownloader;
|
||||
|
||||
public class HttpHelper : HttpClient
|
||||
{
|
||||
@ -1,4 +1,10 @@
|
||||
using System;
|
||||
global using System;
|
||||
global using System.Threading.Tasks;
|
||||
global using System.Collections.Generic;
|
||||
global using DTLib.Filesystem;
|
||||
global using DTLib.Extensions;
|
||||
global using DTLib.Logging.New;
|
||||
using DTLib.Logging.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using VkNet;
|
||||
@ -8,15 +14,10 @@ using VkNet.Model.RequestParams;
|
||||
using VkNet.Utils;
|
||||
using VkNet.Model.Attachments;
|
||||
using VkNet.AudioBypassService.Extensions;
|
||||
using DTLib.Logging.DependencyInjection;
|
||||
using DTLib.Logging.New;
|
||||
using DTLib.Filesystem;
|
||||
using VkAudioDownloader.VkM3U8;
|
||||
|
||||
namespace VkAudioDownloader;
|
||||
|
||||
|
||||
|
||||
public class VkClient : IDisposable
|
||||
{
|
||||
public VkApi Api;
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTLib.Extensions;
|
||||
|
||||
namespace VkAudioDownloader.VkM3U8;
|
||||
|
||||
public class M3U8Parser
|
||||
@ -78,7 +73,7 @@ public class M3U8Parser
|
||||
if(line.StartsWith("#EXTINF:"))
|
||||
{
|
||||
var duration = line.After(':').Before(',');
|
||||
_fragmentDuration = float.Parse(duration, NumberStyles.Any, CultureInfo.InvariantCulture.NumberFormat);
|
||||
_fragmentDuration = duration.ToFloat();
|
||||
}
|
||||
else if (line.StartsWith("#EXT-X-KEY:METHOD="))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user