Major refactor #141

Merged
sim0n00ps merged 55 commits from whimsical-c4lic0/OF-DL:refactor-architecture into master 2026-02-13 00:21:58 +00:00
15 changed files with 113 additions and 100 deletions
Showing only changes of commit a57af4042f - Show all commits

View File

@ -27,8 +27,8 @@ public static class VersionHelper
Log.Debug("GetLatestReleaseTag API Response: ");
Log.Debug(body);
LatestReleaseAPIResponse? versionCheckResponse =
JsonConvert.DeserializeObject<LatestReleaseAPIResponse>(body);
LatestReleaseApiResponse? versionCheckResponse =
JsonConvert.DeserializeObject<LatestReleaseApiResponse>(body);
if (versionCheckResponse == null || versionCheckResponse.TagName == "")
{

View File

@ -4,10 +4,18 @@ namespace OF_DL.Models;
public class Auth
{
public string? USER_ID { get; set; } = "";
public string? USER_AGENT { get; set; } = "";
public string? X_BC { get; set; } = "";
public string? COOKIE { get; set; } = "";
[JsonProperty(PropertyName = "USER_ID")]
public string? UserId { get; set; } = "";
[JsonIgnore] public string? FFMPEG_PATH { get; set; } = "";
[JsonProperty(PropertyName = "USER_AGENT")]
public string? UserAgent { get; set; } = "";
[JsonProperty(PropertyName = "X_BC")] public string? XBc { get; set; } = "";
[JsonProperty(PropertyName = "COOKIE")]
public string? Cookie { get; set; } = "";
[JsonIgnore]
[JsonProperty(PropertyName = "FFMPEG_PATH")]
public string? FfmpegPath { get; set; } = "";
}

View File

@ -2,11 +2,12 @@ using Newtonsoft.Json;
namespace OF_DL.Models;
// ReSharper disable once InconsistentNaming
public class CDRMProjectRequest
{
[JsonProperty("pssh")] public string PSSH { get; set; } = "";
[JsonProperty("pssh")] public string Pssh { get; set; } = "";
[JsonProperty("licurl")] public string LicenseURL { get; set; } = "";
[JsonProperty("licurl")] public string LicenseUrl { get; set; } = "";
[JsonProperty("headers")] public string Headers { get; set; } = "";

View File

@ -105,52 +105,39 @@ public class Config : IFileNameFormatConfig
public IFileNameFormatConfig GetCreatorFileNameFormatConfig(string username)
{
FileNameFormatConfig createFileNameFormatConfig = new();
Func<string?, string?, string?> func = (val1, val2) =>
{
if (string.IsNullOrEmpty(val1))
{
return val2;
}
return val1;
};
FileNameFormatConfig combinedFilenameFormatConfig = new();
if (CreatorConfigs.TryGetValue(username, out CreatorConfig? creatorConfig))
{
createFileNameFormatConfig.PaidMessageFileNameFormat = creatorConfig.PaidMessageFileNameFormat;
createFileNameFormatConfig.PostFileNameFormat = creatorConfig.PostFileNameFormat;
createFileNameFormatConfig.MessageFileNameFormat = creatorConfig.MessageFileNameFormat;
createFileNameFormatConfig.PaidPostFileNameFormat = creatorConfig.PaidPostFileNameFormat;
}
combinedFilenameFormatConfig.PaidMessageFileNameFormat =
!string.IsNullOrEmpty(creatorConfig.PaidMessageFileNameFormat)
? creatorConfig.PaidMessageFileNameFormat
: PaidMessageFileNameFormat;
createFileNameFormatConfig.PaidMessageFileNameFormat =
func(createFileNameFormatConfig.PaidMessageFileNameFormat, PaidMessageFileNameFormat);
createFileNameFormatConfig.PostFileNameFormat =
func(createFileNameFormatConfig.PostFileNameFormat, PostFileNameFormat);
createFileNameFormatConfig.MessageFileNameFormat =
func(createFileNameFormatConfig.MessageFileNameFormat, MessageFileNameFormat);
createFileNameFormatConfig.PaidPostFileNameFormat =
func(createFileNameFormatConfig.PaidPostFileNameFormat, PaidPostFileNameFormat);
combinedFilenameFormatConfig.PostFileNameFormat = !string.IsNullOrEmpty(creatorConfig.PostFileNameFormat)
? creatorConfig.PostFileNameFormat
: PostFileNameFormat;
combinedFilenameFormatConfig.MessageFileNameFormat =
!string.IsNullOrEmpty(creatorConfig.MessageFileNameFormat)
? creatorConfig.MessageFileNameFormat
: MessageFileNameFormat;
combinedFilenameFormatConfig.PaidPostFileNameFormat =
!string.IsNullOrEmpty(creatorConfig.PaidPostFileNameFormat)
? creatorConfig.PaidPostFileNameFormat
: PaidPostFileNameFormat;
}
Log.Debug("PaidMessageFilenameFormat: {CombinedConfigPaidMessageFileNameFormat}",
createFileNameFormatConfig.PaidMessageFileNameFormat);
combinedFilenameFormatConfig.PaidMessageFileNameFormat);
Log.Debug("PostFileNameFormat: {CombinedConfigPostFileNameFormat}",
createFileNameFormatConfig.PostFileNameFormat);
combinedFilenameFormatConfig.PostFileNameFormat);
Log.Debug("MessageFileNameFormat: {CombinedConfigMessageFileNameFormat}",
createFileNameFormatConfig.MessageFileNameFormat);
combinedFilenameFormatConfig.MessageFileNameFormat);
Log.Debug("PaidPostFileNameFormat: {CombinedConfigPaidPostFileNameFormat}",
createFileNameFormatConfig.PaidPostFileNameFormat);
combinedFilenameFormatConfig.PaidPostFileNameFormat);
return createFileNameFormatConfig;
return combinedFilenameFormatConfig;
}
}
public class CreatorConfig : IFileNameFormatConfig
{
public string? PaidPostFileNameFormat { get; set; }
public string? PostFileNameFormat { get; set; }
public string? PaidMessageFileNameFormat { get; set; }
public string? MessageFileNameFormat { get; set; }
}

View File

@ -0,0 +1,12 @@
namespace OF_DL.Models;
public class CreatorConfig : IFileNameFormatConfig
{
public string? PaidPostFileNameFormat { get; set; }
public string? PostFileNameFormat { get; set; }
public string? PaidMessageFileNameFormat { get; set; }
public string? MessageFileNameFormat { get; set; }
}

View File

@ -26,5 +26,5 @@ public class DynamicRules
public int? ChecksumConstant { get; set; }
[JsonProperty(PropertyName = "checksum_indexes")]
public List<int> ChecksumIndexes { get; set; }
public List<int> ChecksumIndexes { get; set; } = [];
}

View File

@ -3,7 +3,10 @@ namespace OF_DL.Models;
public class FileNameFormatConfig : IFileNameFormatConfig
{
public string? PaidPostFileNameFormat { get; set; }
public string? PostFileNameFormat { get; set; }
public string? PaidMessageFileNameFormat { get; set; }
public string? MessageFileNameFormat { get; set; }
}

View File

@ -3,7 +3,10 @@ namespace OF_DL.Models;
public interface IFileNameFormatConfig
{
string? PaidPostFileNameFormat { get; set; }
string? PostFileNameFormat { get; set; }
string? PaidMessageFileNameFormat { get; set; }
string? MessageFileNameFormat { get; set; }
}

View File

@ -2,7 +2,7 @@ using Newtonsoft.Json;
namespace OF_DL.Models;
public class LatestReleaseAPIResponse
public class LatestReleaseApiResponse
{
[JsonProperty(PropertyName = "tag_name")]
public string TagName { get; set; } = "";

View File

@ -2,11 +2,12 @@ using Newtonsoft.Json;
namespace OF_DL.Models;
// ReSharper disable once InconsistentNaming
public class OFDLRequest
{
[JsonProperty("pssh")] public string PSSH { get; set; } = "";
[JsonProperty("pssh")] public string Pssh { get; set; } = "";
[JsonProperty("licenceURL")] public string LicenseURL { get; set; } = "";
[JsonProperty("licenceURL")] public string LicenseUrl { get; set; } = "";
[JsonProperty("headers")] public string Headers { get; set; } = "";
}

View File

@ -1,6 +1,4 @@
namespace OF_DL.Models;
[AttributeUsage(AttributeTargets.Property)]
internal class ToggleableConfigAttribute : Attribute
{
}
internal class ToggleableConfigAttribute : Attribute;

View File

@ -376,12 +376,12 @@ public class Program(IServiceProvider serviceProvider)
Log.Debug($"FFMPEG found: {configService.CurrentConfig.FFmpegPath}");
Log.Debug("FFMPEG path set in config.conf");
}
else if (!string.IsNullOrEmpty(authService.CurrentAuth!.FFMPEG_PATH) &&
ValidateFilePath(authService.CurrentAuth.FFMPEG_PATH))
else if (!string.IsNullOrEmpty(authService.CurrentAuth!.FfmpegPath) &&
ValidateFilePath(authService.CurrentAuth.FfmpegPath))
{
// FFmpeg path is set in auth.json and is valid (config.conf takes precedence and auth.json is only available for backward compatibility)
ffmpegFound = true;
configService.CurrentConfig.FFmpegPath = authService.CurrentAuth.FFMPEG_PATH;
configService.CurrentConfig.FFmpegPath = authService.CurrentAuth.FfmpegPath;
Log.Debug($"FFMPEG found: {configService.CurrentConfig.FFmpegPath}");
Log.Debug("FFMPEG path set in auth.json");
}
@ -2638,7 +2638,7 @@ public class Program(IServiceProvider serviceProvider)
public static void ValidateCookieString(Auth auth)
{
string pattern = @"(auth_id=\d+)|(sess=[^;]+)";
MatchCollection matches = Regex.Matches(auth.COOKIE, pattern);
MatchCollection matches = Regex.Matches(auth.Cookie, pattern);
string output = string.Join("; ", matches);
@ -2647,9 +2647,9 @@ public class Program(IServiceProvider serviceProvider)
output += ";";
}
if (auth.COOKIE.Trim() != output.Trim())
if (auth.Cookie.Trim() != output.Trim())
{
auth.COOKIE = output;
auth.Cookie = output;
string newAuthString = JsonConvert.SerializeObject(auth, Formatting.Indented);
File.WriteAllText("auth.json", newAuthString);
}

View File

@ -95,7 +95,7 @@ public class APIService(IAuthService authService, IConfigService configService,
DateTimeOffset dto = DateTime.UtcNow;
long timestamp = dto.ToUnixTimeMilliseconds();
string input = $"{root!.StaticParam}\n{timestamp}\n{path + queryParams}\n{authService.CurrentAuth.USER_ID}";
string input = $"{root!.StaticParam}\n{timestamp}\n{path + queryParams}\n{authService.CurrentAuth.UserId}";
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
byte[] hashBytes = SHA1.HashData(inputBytes);
string hashString = BitConverter.ToString(hashBytes).Replace("-", "").ToLower();
@ -108,12 +108,12 @@ public class APIService(IAuthService authService, IConfigService configService,
{
{ "accept", "application/json, text/plain" },
{ "app-token", root.AppToken! },
{ "cookie", authService.CurrentAuth!.COOKIE! },
{ "cookie", authService.CurrentAuth!.Cookie! },
{ "sign", sign },
{ "time", timestamp.ToString() },
{ "user-id", authService.CurrentAuth!.USER_ID! },
{ "user-agent", authService.CurrentAuth!.USER_AGENT! },
{ "x-bc", authService.CurrentAuth!.X_BC! }
{ "user-id", authService.CurrentAuth!.UserId! },
{ "user-agent", authService.CurrentAuth!.UserAgent! },
{ "x-bc", authService.CurrentAuth!.XBc! }
};
return headers;
}
@ -1634,7 +1634,7 @@ public class APIService(IAuthService authService, IConfigService configService,
}
if (!configService.CurrentConfig.IgnoreOwnMessages ||
list.FromUser?.Id != Convert.ToInt32(authService.CurrentAuth.USER_ID))
list.FromUser?.Id != Convert.ToInt32(authService.CurrentAuth.UserId))
{
await dbService.AddMessage(folder, list.Id, list.Text ?? "", list.Price ?? "0",
list.CanPurchaseReason == "opened" ? true :
@ -1834,7 +1834,7 @@ public class APIService(IAuthService authService, IConfigService configService,
message = MessagesMapper.FromDto(messageDto);
if (!configService.CurrentConfig.IgnoreOwnMessages ||
message.FromUser?.Id != Convert.ToInt32(authService.CurrentAuth.USER_ID))
message.FromUser?.Id != Convert.ToInt32(authService.CurrentAuth.UserId))
{
await dbService.AddMessage(folder, message.Id, message.Text ?? "",
message.Price != null ? message.Price.ToString() : "0", true, false,
@ -2101,7 +2101,7 @@ public class APIService(IAuthService authService, IConfigService configService,
.OrderByDescending(p => p.PostedAt ?? p.CreatedAt))
{
if (!configService.CurrentConfig.IgnoreOwnMessages ||
purchase.FromUser.Id != Convert.ToInt32(authService.CurrentAuth.USER_ID))
purchase.FromUser.Id != Convert.ToInt32(authService.CurrentAuth.UserId))
{
if (purchase.PostedAt != null)
{
@ -3034,10 +3034,10 @@ public class APIService(IAuthService authService, IConfigService configService,
HttpClient client = new();
HttpRequestMessage request = new(HttpMethod.Get, mpdUrl);
request.Headers.Add("user-agent", authService.CurrentAuth.USER_AGENT);
request.Headers.Add("user-agent", authService.CurrentAuth.UserAgent);
request.Headers.Add("Accept", "*/*");
request.Headers.Add("Cookie",
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {authService.CurrentAuth.COOKIE};");
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {authService.CurrentAuth.Cookie};");
using (HttpResponseMessage response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
@ -3083,10 +3083,10 @@ public class APIService(IAuthService authService, IConfigService configService,
HttpClient client = new();
HttpRequestMessage request = new(HttpMethod.Get, mpdUrl);
request.Headers.Add("user-agent", authService.CurrentAuth.USER_AGENT);
request.Headers.Add("user-agent", authService.CurrentAuth.UserAgent);
request.Headers.Add("Accept", "*/*");
request.Headers.Add("Cookie",
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {authService.CurrentAuth.COOKIE};");
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {authService.CurrentAuth.Cookie};");
using (HttpResponseMessage response =
await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead))
{
@ -3129,8 +3129,8 @@ public class APIService(IAuthService authService, IConfigService configService,
CDRMProjectRequest cdrmProjectRequest = new()
{
PSSH = pssh,
LicenseURL = licenceURL,
Pssh = pssh,
LicenseUrl = licenceURL,
Headers = JsonConvert.SerializeObject(drmHeaders),
Cookies = "",
Data = ""
@ -3212,7 +3212,7 @@ public class APIService(IAuthService authService, IConfigService configService,
OFDLRequest ofdlRequest = new()
{
PSSH = pssh, LicenseURL = licenceURL, Headers = JsonConvert.SerializeObject(drmHeaders)
Pssh = pssh, LicenseUrl = licenceURL, Headers = JsonConvert.SerializeObject(drmHeaders)
};
string json = JsonConvert.SerializeObject(ofdlRequest);

View File

@ -212,7 +212,7 @@ public class AuthService : IAuthService
string cookies = string.Join(" ", mappedCookies.Keys.Where(key => _desiredCookies.Contains(key))
.Select(key => $"${key}={mappedCookies[key]};"));
return new Auth { COOKIE = cookies, USER_AGENT = userAgent, USER_ID = userId, X_BC = xBc };
return new Auth { Cookie = cookies, UserAgent = userAgent, UserId = userId, XBc = xBc };
}
catch (Exception e)
{

View File

@ -334,10 +334,10 @@ public class DownloadService(
{
HttpClient client = new();
HttpRequestMessage request = new(HttpMethod.Get, mpdUrl);
request.Headers.Add("user-agent", authService.CurrentAuth.USER_AGENT);
request.Headers.Add("user-agent", authService.CurrentAuth.UserAgent);
request.Headers.Add("Accept", "*/*");
request.Headers.Add("Cookie",
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {authService.CurrentAuth.COOKIE};");
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {authService.CurrentAuth.Cookie};");
using (HttpResponseMessage response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
@ -568,8 +568,8 @@ public class DownloadService(
using HttpClient client = new();
client.DefaultRequestHeaders.Add("Cookie",
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {authService.CurrentAuth.COOKIE}");
client.DefaultRequestHeaders.Add("User-Agent", authService.CurrentAuth.USER_AGENT);
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {authService.CurrentAuth.Cookie}");
client.DefaultRequestHeaders.Add("User-Agent", authService.CurrentAuth.UserAgent);
using HttpResponseMessage response =
await client.GetAsync(mpdURL, HttpCompletionOption.ResponseHeadersRead);
@ -581,7 +581,7 @@ public class DownloadService(
else
{
using HttpClient client = new();
client.DefaultRequestHeaders.Add("User-Agent", authService.CurrentAuth.USER_AGENT);
client.DefaultRequestHeaders.Add("User-Agent", authService.CurrentAuth.UserAgent);
using HttpResponseMessage response =
await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead);
if (response.IsSuccessStatusCode)
@ -612,8 +612,8 @@ public class DownloadService(
using HttpClient client = new();
client.DefaultRequestHeaders.Add("Cookie",
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {auth.COOKIE}");
client.DefaultRequestHeaders.Add("User-Agent", auth.USER_AGENT);
$"CloudFront-Policy={policy}; CloudFront-Signature={signature}; CloudFront-Key-Pair-Id={kvp}; {auth.Cookie}");
client.DefaultRequestHeaders.Add("User-Agent", auth.UserAgent);
using HttpResponseMessage response = await client.GetAsync(mpdURL, HttpCompletionOption.ResponseHeadersRead);
if (response.IsSuccessStatusCode)
@ -1242,8 +1242,8 @@ public class DownloadService(
? !File.Exists(folder + path + "/" + customFileName + ".mp4")
: !File.Exists(folder + path + "/" + filename + "_source.mp4"))
{
return await DownloadDrmMedia(authService.CurrentAuth.USER_AGENT, policy, signature, kvp,
authService.CurrentAuth.COOKIE, url, decryptionKey, folder, lastModified, media_id, api_type,
return await DownloadDrmMedia(authService.CurrentAuth.UserAgent, policy, signature, kvp,
authService.CurrentAuth.Cookie, url, decryptionKey, folder, lastModified, media_id, api_type,
progressReporter, customFileName, filename, path);
}
@ -1371,8 +1371,8 @@ public class DownloadService(
? !File.Exists(folder + path + "/" + customFileName + ".mp4")
: !File.Exists(folder + path + "/" + filename + "_source.mp4"))
{
return await DownloadDrmMedia(authService.CurrentAuth.USER_AGENT, policy, signature, kvp,
authService.CurrentAuth.COOKIE, url, decryptionKey, folder, lastModified, media_id, api_type,
return await DownloadDrmMedia(authService.CurrentAuth.UserAgent, policy, signature, kvp,
authService.CurrentAuth.Cookie, url, decryptionKey, folder, lastModified, media_id, api_type,
progressReporter, customFileName, filename, path);
}
@ -1501,8 +1501,8 @@ public class DownloadService(
? !File.Exists(folder + path + "/" + customFileName + ".mp4")
: !File.Exists(folder + path + "/" + filename + "_source.mp4"))
{
return await DownloadDrmMedia(authService.CurrentAuth.USER_AGENT, policy, signature, kvp,
authService.CurrentAuth.COOKIE, url, decryptionKey, folder, lastModified, media_id, api_type,
return await DownloadDrmMedia(authService.CurrentAuth.UserAgent, policy, signature, kvp,
authService.CurrentAuth.Cookie, url, decryptionKey, folder, lastModified, media_id, api_type,
progressReporter, customFileName, filename, path);
}
@ -1629,8 +1629,8 @@ public class DownloadService(
? !File.Exists(folder + path + "/" + customFileName + ".mp4")
: !File.Exists(folder + path + "/" + filename + "_source.mp4"))
{
return await DownloadDrmMedia(authService.CurrentAuth.USER_AGENT, policy, signature, kvp,
authService.CurrentAuth.COOKIE, url, decryptionKey, folder, lastModified, media_id, api_type,
return await DownloadDrmMedia(authService.CurrentAuth.UserAgent, policy, signature, kvp,
authService.CurrentAuth.Cookie, url, decryptionKey, folder, lastModified, media_id, api_type,
progressReporter, customFileName, filename, path);
}
@ -1759,8 +1759,8 @@ public class DownloadService(
? !File.Exists(folder + path + "/" + customFileName + ".mp4")
: !File.Exists(folder + path + "/" + filename + "_source.mp4"))
{
return await DownloadDrmMedia(authService.CurrentAuth.USER_AGENT, policy, signature, kvp,
authService.CurrentAuth.COOKIE, url, decryptionKey, folder, lastModified, media_id, api_type,
return await DownloadDrmMedia(authService.CurrentAuth.UserAgent, policy, signature, kvp,
authService.CurrentAuth.Cookie, url, decryptionKey, folder, lastModified, media_id, api_type,
progressReporter, customFileName, filename, path);
}
@ -1888,8 +1888,8 @@ public class DownloadService(
? !File.Exists(folder + path + "/" + customFileName + ".mp4")
: !File.Exists(folder + path + "/" + filename + "_source.mp4"))
{
return await DownloadDrmMedia(authService.CurrentAuth.USER_AGENT, policy, signature, kvp,
authService.CurrentAuth.COOKIE, url, decryptionKey, folder, lastModified, media_id, api_type,
return await DownloadDrmMedia(authService.CurrentAuth.UserAgent, policy, signature, kvp,
authService.CurrentAuth.Cookie, url, decryptionKey, folder, lastModified, media_id, api_type,
progressReporter, customFileName, filename, path);
}
@ -2017,8 +2017,8 @@ public class DownloadService(
? !File.Exists(folder + path + "/" + customFileName + ".mp4")
: !File.Exists(folder + path + "/" + filename + "_source.mp4"))
{
return await DownloadDrmMedia(authService.CurrentAuth.USER_AGENT, policy, signature, kvp,
authService.CurrentAuth.COOKIE, url, decryptionKey, folder, lastModified, media_id, api_type,
return await DownloadDrmMedia(authService.CurrentAuth.UserAgent, policy, signature, kvp,
authService.CurrentAuth.Cookie, url, decryptionKey, folder, lastModified, media_id, api_type,
progressReporter, customFileName, filename, path);
}
@ -2147,8 +2147,8 @@ public class DownloadService(
? !File.Exists(folder + path + "/" + customFileName + ".mp4")
: !File.Exists(folder + path + "/" + filename + "_source.mp4"))
{
return await DownloadDrmMedia(authService.CurrentAuth.USER_AGENT, policy, signature, kvp,
authService.CurrentAuth.COOKIE, url, decryptionKey, folder, lastModified, media_id, api_type,
return await DownloadDrmMedia(authService.CurrentAuth.UserAgent, policy, signature, kvp,
authService.CurrentAuth.Cookie, url, decryptionKey, folder, lastModified, media_id, api_type,
progressReporter, customFileName, filename, path);
}
@ -2267,8 +2267,8 @@ public class DownloadService(
? !File.Exists(folder + path + "/" + customFileName + ".mp4")
: !File.Exists(folder + path + "/" + filename + "_source.mp4"))
{
return await DownloadDrmMedia(authService.CurrentAuth.USER_AGENT, policy, signature, kvp,
authService.CurrentAuth.COOKIE, url, decryptionKey, folder, lastModified, media_id, api_type,
return await DownloadDrmMedia(authService.CurrentAuth.UserAgent, policy, signature, kvp,
authService.CurrentAuth.Cookie, url, decryptionKey, folder, lastModified, media_id, api_type,
progressReporter, customFileName, filename, path);
}