[REFACTOR]

This commit is contained in:
max
2025-10-23 21:51:31 +02:00
parent 264be8d529
commit de28591d24
5 changed files with 9 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ public static class CipherManager
private static readonly CipherDecoderCollection LoadedCiphers = [];
private static readonly ILogger Logger = LogService.RegisterLogger(typeof(CipherManager));
public static async Task<Result<CipherDecoder>> GetDecoderAsync(ClientState clientState)
public static async Task<Result<CipherDecoder>> GetDecoderAsync(ClientState clientState, YouTubeClient? client = null)
{
var relativePlayerJsUrl = clientState.PlayerJsUrl;
if (string.IsNullOrEmpty(relativePlayerJsUrl))
@@ -26,7 +26,7 @@ public static class CipherManager
try
{
var decoder = await CipherDecoder.CreateAsync(relativePlayerJsUrl, version);
var decoder = await CipherDecoder.CreateAsync(relativePlayerJsUrl, version, client);
LoadedCiphers.Add(decoder);
}
catch (Exception e)