Reduce duplicated code and simplify download media methods
This commit is contained in:
parent
a8b2acaad6
commit
44a9fb1fcd
520
OF DL/Program.cs
520
OF DL/Program.cs
@ -1491,64 +1491,43 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
foreach (KeyValuePair<long, string> purchasedPostKVP in purchasedPosts.PaidPosts)
|
foreach (KeyValuePair<long, string> purchasedPostKVP in purchasedPosts.PaidPosts)
|
||||||
{
|
{
|
||||||
bool isNew;
|
bool isNew;
|
||||||
|
MessageEntities.Medium? mediaInfo =
|
||||||
|
purchasedPosts?.PaidPostMedia?.FirstOrDefault(m => m.Id == purchasedPostKVP.Key);
|
||||||
|
PurchasedEntities.ListItem? postInfo = mediaInfo != null
|
||||||
|
? purchasedPosts?.PaidPostObjects?.FirstOrDefault(p =>
|
||||||
|
p?.Media?.Any(m => m.Id == purchasedPostKVP.Key) == true)
|
||||||
|
: null;
|
||||||
|
string filenameFormat = configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
||||||
|
.PaidPostFileNameFormat ?? "";
|
||||||
|
string paidPostPath = configService.CurrentConfig.FolderPerPaidPost && postInfo != null &&
|
||||||
|
postInfo?.Id is not null && postInfo?.PostedAt is not null
|
||||||
|
? $"/Posts/Paid/{postInfo.Id} {postInfo.PostedAt.Value:yyyy-MM-dd HH-mm-ss}"
|
||||||
|
: "/Posts/Paid";
|
||||||
|
|
||||||
if (purchasedPostKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
if (purchasedPostKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
||||||
{
|
{
|
||||||
string[] messageUrlParsed = purchasedPostKVP.Value.Split(',');
|
string[] parsed = purchasedPostKVP.Value.Split(',');
|
||||||
string mpdURL = messageUrlParsed[0];
|
(string decryptionKey, DateTime lastModified)? drmInfo =
|
||||||
string policy = messageUrlParsed[1];
|
await downloadService.GetDecryptionInfo(parsed[0], parsed[1], parsed[2], parsed[3],
|
||||||
string signature = messageUrlParsed[2];
|
parsed[4], parsed[5], "post", clientIdBlobMissing, devicePrivateKeyMissing);
|
||||||
string kvp = messageUrlParsed[3];
|
if (drmInfo == null)
|
||||||
string mediaId = messageUrlParsed[4];
|
|
||||||
string postId = messageUrlParsed[5];
|
|
||||||
string? licenseURL = null;
|
|
||||||
string? pssh = await apiService.GetDRMMPDPSSH(mpdURL, policy, signature, kvp);
|
|
||||||
if (pssh == null)
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
DateTime lastModified = await apiService.GetDRMMPDLastModified(mpdURL, policy, signature, kvp);
|
isNew = await downloadService.DownloadDRMVideo(parsed[1], parsed[2], parsed[3], parsed[0],
|
||||||
Dictionary<string, string> drmHeaders =
|
drmInfo.Value.decryptionKey, path, drmInfo.Value.lastModified, purchasedPostKVP.Key,
|
||||||
apiService.GetDynamicHeaders($"/api2/v2/users/media/{mediaId}/drm/post/{postId}",
|
"Posts",
|
||||||
"?type=widevine");
|
new SpectreProgressReporter(task), paidPostPath + "/Videos", filenameFormat,
|
||||||
string decryptionKey;
|
postInfo, mediaInfo, postInfo?.FromUser, users);
|
||||||
if (clientIdBlobMissing || devicePrivateKeyMissing)
|
|
||||||
{
|
|
||||||
decryptionKey = await apiService.GetDecryptionKeyOFDL(drmHeaders,
|
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/post/{postId}?type=widevine",
|
|
||||||
pssh);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
decryptionKey = await apiService.GetDecryptionKeyCDM(drmHeaders,
|
isNew = await downloadService.DownloadMedia(purchasedPostKVP.Value, path,
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/post/{postId}?type=widevine",
|
purchasedPostKVP.Key, "Posts", new SpectreProgressReporter(task),
|
||||||
pssh);
|
paidPostPath, filenameFormat, postInfo, mediaInfo, postInfo?.FromUser, users);
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageEntities.Medium? mediaInfo =
|
|
||||||
purchasedPosts?.PaidPostMedia?.FirstOrDefault(m => m.Id == purchasedPostKVP.Key);
|
|
||||||
PurchasedEntities.ListItem? postInfo = mediaInfo != null
|
|
||||||
? purchasedPosts?.PaidPostObjects?.FirstOrDefault(p =>
|
|
||||||
p?.Media?.Any(m => m.Id == purchasedPostKVP.Key) == true)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
isNew = await downloadService.DownloadPurchasedPostDRMVideo(
|
|
||||||
policy,
|
|
||||||
signature,
|
|
||||||
kvp,
|
|
||||||
mpdURL,
|
|
||||||
decryptionKey,
|
|
||||||
path,
|
|
||||||
lastModified,
|
|
||||||
purchasedPostKVP.Key,
|
|
||||||
"Posts",
|
|
||||||
new SpectreProgressReporter(task),
|
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
|
||||||
.PaidPostFileNameFormat ?? "",
|
|
||||||
postInfo,
|
|
||||||
mediaInfo,
|
|
||||||
postInfo?.FromUser,
|
|
||||||
users);
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
{
|
{
|
||||||
newPaidPostCount++;
|
newPaidPostCount++;
|
||||||
@ -1558,37 +1537,6 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
oldPaidPostCount++;
|
oldPaidPostCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageEntities.Medium? mediaInfo =
|
|
||||||
purchasedPosts?.PaidPostMedia?.FirstOrDefault(m => m.Id == purchasedPostKVP.Key);
|
|
||||||
PurchasedEntities.ListItem? postInfo = mediaInfo != null
|
|
||||||
? purchasedPosts?.PaidPostObjects?.FirstOrDefault(p =>
|
|
||||||
p?.Media?.Any(m => m.Id == purchasedPostKVP.Key) == true)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
isNew = await downloadService.DownloadPurchasedPostMedia(
|
|
||||||
purchasedPostKVP.Value,
|
|
||||||
path,
|
|
||||||
purchasedPostKVP.Key,
|
|
||||||
"Posts",
|
|
||||||
new SpectreProgressReporter(task),
|
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
|
||||||
.PaidPostFileNameFormat ?? "",
|
|
||||||
postInfo,
|
|
||||||
mediaInfo,
|
|
||||||
postInfo?.FromUser,
|
|
||||||
users);
|
|
||||||
if (isNew)
|
|
||||||
{
|
|
||||||
newPaidPostCount++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
oldPaidPostCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task.StopTask();
|
task.StopTask();
|
||||||
});
|
});
|
||||||
@ -1643,62 +1591,41 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
foreach (KeyValuePair<long, string> paidMessageKVP in paidMessageCollection.PaidMessages)
|
foreach (KeyValuePair<long, string> paidMessageKVP in paidMessageCollection.PaidMessages)
|
||||||
{
|
{
|
||||||
bool isNew;
|
bool isNew;
|
||||||
if (paidMessageKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
|
||||||
{
|
|
||||||
string[] messageUrlParsed = paidMessageKVP.Value.Split(',');
|
|
||||||
string mpdURL = messageUrlParsed[0];
|
|
||||||
string policy = messageUrlParsed[1];
|
|
||||||
string signature = messageUrlParsed[2];
|
|
||||||
string kvp = messageUrlParsed[3];
|
|
||||||
string mediaId = messageUrlParsed[4];
|
|
||||||
string messageId = messageUrlParsed[5];
|
|
||||||
string? licenseURL = null;
|
|
||||||
string? pssh = await apiService.GetDRMMPDPSSH(mpdURL, policy, signature, kvp);
|
|
||||||
if (pssh != null)
|
|
||||||
{
|
|
||||||
DateTime lastModified =
|
|
||||||
await apiService.GetDRMMPDLastModified(mpdURL, policy, signature, kvp);
|
|
||||||
Dictionary<string, string> drmHeaders =
|
|
||||||
apiService.GetDynamicHeaders(
|
|
||||||
$"/api2/v2/users/media/{mediaId}/drm/message/{messageId}", "?type=widevine");
|
|
||||||
string decryptionKey;
|
|
||||||
if (clientIdBlobMissing || devicePrivateKeyMissing)
|
|
||||||
{
|
|
||||||
decryptionKey = await apiService.GetDecryptionKeyOFDL(drmHeaders,
|
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/message/{messageId}?type=widevine",
|
|
||||||
pssh);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
decryptionKey = await apiService.GetDecryptionKeyCDM(drmHeaders,
|
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/message/{messageId}?type=widevine",
|
|
||||||
pssh);
|
|
||||||
}
|
|
||||||
|
|
||||||
MessageEntities.Medium? mediaInfo =
|
MessageEntities.Medium? mediaInfo =
|
||||||
paidMessageCollection.PaidMessageMedia.FirstOrDefault(m =>
|
paidMessageCollection.PaidMessageMedia.FirstOrDefault(m => m.Id == paidMessageKVP.Key);
|
||||||
m.Id == paidMessageKVP.Key);
|
|
||||||
PurchasedEntities.ListItem? messageInfo =
|
PurchasedEntities.ListItem? messageInfo =
|
||||||
paidMessageCollection.PaidMessageObjects.FirstOrDefault(p =>
|
paidMessageCollection.PaidMessageObjects.FirstOrDefault(p =>
|
||||||
p?.Media?.Any(m => m.Id == paidMessageKVP.Key) == true);
|
p?.Media?.Any(m => m.Id == paidMessageKVP.Key) == true);
|
||||||
|
string filenameFormat = configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
||||||
|
.PaidMessageFileNameFormat ?? "";
|
||||||
|
string paidMsgPath = configService.CurrentConfig.FolderPerPaidMessage && messageInfo != null &&
|
||||||
|
messageInfo?.Id is not null && messageInfo?.CreatedAt is not null
|
||||||
|
? $"/Messages/Paid/{messageInfo.Id} {messageInfo.CreatedAt.Value:yyyy-MM-dd HH-mm-ss}"
|
||||||
|
: "/Messages/Paid";
|
||||||
|
|
||||||
isNew = await downloadService.DownloadPurchasedMessageDRMVideo(
|
if (paidMessageKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
||||||
policy,
|
{
|
||||||
signature,
|
string[] parsed = paidMessageKVP.Value.Split(',');
|
||||||
kvp,
|
(string decryptionKey, DateTime lastModified)? drmInfo =
|
||||||
mpdURL,
|
await downloadService.GetDecryptionInfo(parsed[0], parsed[1], parsed[2], parsed[3],
|
||||||
decryptionKey,
|
parsed[4], parsed[5], "message", clientIdBlobMissing, devicePrivateKeyMissing);
|
||||||
path,
|
if (drmInfo == null)
|
||||||
lastModified,
|
{
|
||||||
paidMessageKVP.Key,
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
isNew = await downloadService.DownloadDRMVideo(parsed[1], parsed[2], parsed[3], parsed[0],
|
||||||
|
drmInfo.Value.decryptionKey, path, drmInfo.Value.lastModified, paidMessageKVP.Key,
|
||||||
"Messages",
|
"Messages",
|
||||||
new SpectreProgressReporter(task),
|
new SpectreProgressReporter(task), paidMsgPath + "/Videos", filenameFormat,
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
messageInfo, mediaInfo, messageInfo?.FromUser, users);
|
||||||
.PaidMessageFileNameFormat ?? "",
|
}
|
||||||
messageInfo,
|
else
|
||||||
mediaInfo,
|
{
|
||||||
messageInfo?.FromUser,
|
isNew = await downloadService.DownloadMedia(paidMessageKVP.Value, path,
|
||||||
users);
|
paidMessageKVP.Key, "Messages", new SpectreProgressReporter(task),
|
||||||
|
paidMsgPath, filenameFormat, messageInfo, mediaInfo, messageInfo?.FromUser, users);
|
||||||
|
}
|
||||||
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
{
|
{
|
||||||
@ -1709,37 +1636,6 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
oldPaidMessagesCount++;
|
oldPaidMessagesCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageEntities.Medium? mediaInfo =
|
|
||||||
paidMessageCollection.PaidMessageMedia.FirstOrDefault(m => m.Id == paidMessageKVP.Key);
|
|
||||||
PurchasedEntities.ListItem messageInfo =
|
|
||||||
paidMessageCollection.PaidMessageObjects.FirstOrDefault(p =>
|
|
||||||
p?.Media?.Any(m => m.Id == paidMessageKVP.Key) == true);
|
|
||||||
|
|
||||||
isNew = await downloadService.DownloadPurchasedMedia(
|
|
||||||
paidMessageKVP.Value,
|
|
||||||
path,
|
|
||||||
paidMessageKVP.Key,
|
|
||||||
"Messages",
|
|
||||||
new SpectreProgressReporter(task),
|
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
|
||||||
.PaidMessageFileNameFormat ?? "",
|
|
||||||
messageInfo,
|
|
||||||
mediaInfo,
|
|
||||||
messageInfo?.FromUser,
|
|
||||||
users);
|
|
||||||
if (isNew)
|
|
||||||
{
|
|
||||||
newPaidMessagesCount++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
oldPaidMessagesCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task.StopTask();
|
task.StopTask();
|
||||||
});
|
});
|
||||||
@ -1826,6 +1722,9 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
IAPIService apiService = serviceProvider.GetRequiredService<IAPIService>();
|
IAPIService apiService = serviceProvider.GetRequiredService<IAPIService>();
|
||||||
IDownloadService downloadService = serviceProvider.GetRequiredService<IDownloadService>();
|
IDownloadService downloadService = serviceProvider.GetRequiredService<IDownloadService>();
|
||||||
|
|
||||||
|
string filenameFormat = configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
||||||
|
.PaidMessageFileNameFormat ?? "";
|
||||||
|
|
||||||
Log.Debug($"Calling DownloadPaidMessage - {username}");
|
Log.Debug($"Calling DownloadPaidMessage - {username}");
|
||||||
|
|
||||||
AnsiConsole.Markup("[red]Getting Paid Message\n[/]");
|
AnsiConsole.Markup("[red]Getting Paid Message\n[/]");
|
||||||
@ -1870,62 +1769,42 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
.PreviewSingleMessages)
|
.PreviewSingleMessages)
|
||||||
{
|
{
|
||||||
bool isNew;
|
bool isNew;
|
||||||
|
MessageEntities.Medium? mediaInfo =
|
||||||
|
singlePaidMessageCollection.PreviewSingleMessageMedia.FirstOrDefault(m =>
|
||||||
|
m.Id == paidMessageKVP.Key);
|
||||||
|
MessageEntities.SingleMessage? messageInfo =
|
||||||
|
singlePaidMessageCollection.SingleMessageObjects.FirstOrDefault(p =>
|
||||||
|
p?.Media?.Any(m => m.Id == paidMessageKVP.Key) == true);
|
||||||
|
|
||||||
|
string previewMsgPath = configService.CurrentConfig.FolderPerMessage && messageInfo != null &&
|
||||||
|
messageInfo?.Id is not null && messageInfo?.CreatedAt is not null
|
||||||
|
? $"/Messages/Free/{messageInfo.Id} {messageInfo.CreatedAt.Value:yyyy-MM-dd HH-mm-ss}"
|
||||||
|
: "/Messages/Free";
|
||||||
|
|
||||||
if (paidMessageKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
if (paidMessageKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
||||||
{
|
{
|
||||||
string[] messageUrlParsed = paidMessageKVP.Value.Split(',');
|
string[] parsed = paidMessageKVP.Value.Split(',');
|
||||||
string mpdURL = messageUrlParsed[0];
|
(string decryptionKey, DateTime lastModified)? drmInfo =
|
||||||
string policy = messageUrlParsed[1];
|
await downloadService.GetDecryptionInfo(parsed[0], parsed[1], parsed[2], parsed[3],
|
||||||
string signature = messageUrlParsed[2];
|
parsed[4], parsed[5], "message", clientIdBlobMissing, devicePrivateKeyMissing);
|
||||||
string kvp = messageUrlParsed[3];
|
if (drmInfo == null)
|
||||||
string mediaId = messageUrlParsed[4];
|
|
||||||
string messageId = messageUrlParsed[5];
|
|
||||||
string? licenseURL = null;
|
|
||||||
string? pssh = await apiService.GetDRMMPDPSSH(mpdURL, policy, signature, kvp);
|
|
||||||
if (pssh != null)
|
|
||||||
{
|
{
|
||||||
DateTime lastModified =
|
continue;
|
||||||
await apiService.GetDRMMPDLastModified(mpdURL, policy, signature, kvp);
|
}
|
||||||
Dictionary<string, string> drmHeaders =
|
|
||||||
apiService.GetDynamicHeaders(
|
isNew = await downloadService.DownloadDRMVideo(parsed[1], parsed[2], parsed[3], parsed[0],
|
||||||
$"/api2/v2/users/media/{mediaId}/drm/message/{messageId}", "?type=widevine");
|
drmInfo.Value.decryptionKey, path, drmInfo.Value.lastModified, paidMessageKVP.Key,
|
||||||
string decryptionKey;
|
"Messages",
|
||||||
if (clientIdBlobMissing || devicePrivateKeyMissing)
|
new SpectreProgressReporter(task), previewMsgPath + "/Videos", filenameFormat,
|
||||||
{
|
messageInfo, mediaInfo, messageInfo?.FromUser, hasSelectedUsersKVP.Value);
|
||||||
decryptionKey = await apiService.GetDecryptionKeyOFDL(drmHeaders,
|
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/message/{messageId}?type=widevine",
|
|
||||||
pssh);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
decryptionKey = await apiService.GetDecryptionKeyCDM(drmHeaders,
|
isNew = await downloadService.DownloadMedia(paidMessageKVP.Value, path,
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/message/{messageId}?type=widevine",
|
paidMessageKVP.Key, "Messages", new SpectreProgressReporter(task),
|
||||||
pssh);
|
previewMsgPath, filenameFormat, messageInfo, mediaInfo, messageInfo?.FromUser,
|
||||||
}
|
|
||||||
|
|
||||||
MessageEntities.Medium? mediaInfo =
|
|
||||||
singlePaidMessageCollection.PreviewSingleMessageMedia.FirstOrDefault(m =>
|
|
||||||
m.Id == paidMessageKVP.Key);
|
|
||||||
MessageEntities.SingleMessage? messageInfo =
|
|
||||||
singlePaidMessageCollection.SingleMessageObjects.FirstOrDefault(p =>
|
|
||||||
p?.Media?.Any(m => m.Id == paidMessageKVP.Key) == true);
|
|
||||||
|
|
||||||
isNew = await downloadService.DownloadSingleMessagePreviewDRMVideo(
|
|
||||||
policy,
|
|
||||||
signature,
|
|
||||||
kvp,
|
|
||||||
mpdURL,
|
|
||||||
decryptionKey,
|
|
||||||
path,
|
|
||||||
lastModified,
|
|
||||||
paidMessageKVP.Key,
|
|
||||||
"Messages",
|
|
||||||
new SpectreProgressReporter(task),
|
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
|
||||||
.PaidMessageFileNameFormat ?? "",
|
|
||||||
messageInfo,
|
|
||||||
mediaInfo,
|
|
||||||
messageInfo?.FromUser,
|
|
||||||
hasSelectedUsersKVP.Value);
|
hasSelectedUsersKVP.Value);
|
||||||
|
}
|
||||||
|
|
||||||
if (isNew)
|
if (isNew)
|
||||||
{
|
{
|
||||||
@ -1936,38 +1815,6 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
oldPreviewPaidMessagesCount++;
|
oldPreviewPaidMessagesCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageEntities.Medium? mediaInfo =
|
|
||||||
singlePaidMessageCollection.PreviewSingleMessageMedia.FirstOrDefault(m =>
|
|
||||||
m.Id == paidMessageKVP.Key);
|
|
||||||
MessageEntities.SingleMessage? messageInfo =
|
|
||||||
singlePaidMessageCollection.SingleMessageObjects.FirstOrDefault(p =>
|
|
||||||
p?.Media?.Any(m => m.Id == paidMessageKVP.Key) == true);
|
|
||||||
|
|
||||||
isNew = await downloadService.DownloadMessagePreviewMedia(
|
|
||||||
paidMessageKVP.Value,
|
|
||||||
path,
|
|
||||||
paidMessageKVP.Key,
|
|
||||||
"Messages",
|
|
||||||
new SpectreProgressReporter(task),
|
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
|
||||||
.PaidMessageFileNameFormat ?? "",
|
|
||||||
messageInfo,
|
|
||||||
mediaInfo,
|
|
||||||
messageInfo?.FromUser,
|
|
||||||
hasSelectedUsersKVP.Value);
|
|
||||||
if (isNew)
|
|
||||||
{
|
|
||||||
newPreviewPaidMessagesCount++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
oldPreviewPaidMessagesCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task.StopTask();
|
task.StopTask();
|
||||||
});
|
});
|
||||||
@ -2010,93 +1857,42 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
foreach (KeyValuePair<long, string> paidMessageKVP in singlePaidMessageCollection.SingleMessages)
|
foreach (KeyValuePair<long, string> paidMessageKVP in singlePaidMessageCollection.SingleMessages)
|
||||||
{
|
{
|
||||||
bool isNew;
|
bool isNew;
|
||||||
|
MessageEntities.Medium? mediaInfo =
|
||||||
|
singlePaidMessageCollection.SingleMessageMedia.FirstOrDefault(m =>
|
||||||
|
m.Id == paidMessageKVP.Key);
|
||||||
|
MessageEntities.SingleMessage? messageInfo =
|
||||||
|
singlePaidMessageCollection.SingleMessageObjects.FirstOrDefault(p =>
|
||||||
|
p?.Media?.Any(m => m.Id == paidMessageKVP.Key) == true);
|
||||||
|
string filenameFormat = configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
||||||
|
.PaidMessageFileNameFormat ?? "";
|
||||||
|
string singlePaidMsgPath = configService.CurrentConfig.FolderPerPaidMessage &&
|
||||||
|
messageInfo != null && messageInfo?.Id is not null &&
|
||||||
|
messageInfo?.CreatedAt is not null
|
||||||
|
? $"/Messages/Paid/{messageInfo.Id} {messageInfo.CreatedAt.Value:yyyy-MM-dd HH-mm-ss}"
|
||||||
|
: "/Messages/Paid";
|
||||||
|
|
||||||
if (paidMessageKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
if (paidMessageKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
||||||
{
|
{
|
||||||
string[] messageUrlParsed = paidMessageKVP.Value.Split(',');
|
string[] parsed = paidMessageKVP.Value.Split(',');
|
||||||
string mpdURL = messageUrlParsed[0];
|
(string decryptionKey, DateTime lastModified)? drmInfo =
|
||||||
string policy = messageUrlParsed[1];
|
await downloadService.GetDecryptionInfo(parsed[0], parsed[1], parsed[2], parsed[3],
|
||||||
string signature = messageUrlParsed[2];
|
parsed[4], parsed[5], "message", clientIdBlobMissing, devicePrivateKeyMissing);
|
||||||
string kvp = messageUrlParsed[3];
|
if (drmInfo == null)
|
||||||
string mediaId = messageUrlParsed[4];
|
|
||||||
string messageId = messageUrlParsed[5];
|
|
||||||
string? licenseURL = null;
|
|
||||||
string? pssh = await apiService.GetDRMMPDPSSH(mpdURL, policy, signature, kvp);
|
|
||||||
if (pssh != null)
|
|
||||||
{
|
{
|
||||||
DateTime lastModified =
|
continue;
|
||||||
await apiService.GetDRMMPDLastModified(mpdURL, policy, signature, kvp);
|
|
||||||
Dictionary<string, string> drmHeaders =
|
|
||||||
apiService.GetDynamicHeaders(
|
|
||||||
$"/api2/v2/users/media/{mediaId}/drm/message/{messageId}", "?type=widevine");
|
|
||||||
string decryptionKey;
|
|
||||||
if (clientIdBlobMissing || devicePrivateKeyMissing)
|
|
||||||
{
|
|
||||||
decryptionKey = await apiService.GetDecryptionKeyOFDL(drmHeaders,
|
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/message/{messageId}?type=widevine",
|
|
||||||
pssh);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
decryptionKey = await apiService.GetDecryptionKeyCDM(drmHeaders,
|
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/message/{messageId}?type=widevine",
|
|
||||||
pssh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageEntities.Medium? mediaInfo =
|
isNew = await downloadService.DownloadDRMVideo(parsed[1], parsed[2], parsed[3], parsed[0],
|
||||||
singlePaidMessageCollection.SingleMessageMedia.FirstOrDefault(m =>
|
drmInfo.Value.decryptionKey, path, drmInfo.Value.lastModified, paidMessageKVP.Key,
|
||||||
m.Id == paidMessageKVP.Key);
|
|
||||||
MessageEntities.SingleMessage? messageInfo =
|
|
||||||
singlePaidMessageCollection.SingleMessageObjects.FirstOrDefault(p =>
|
|
||||||
p?.Media?.Any(m => m.Id == paidMessageKVP.Key) == true);
|
|
||||||
|
|
||||||
isNew = await downloadService.DownloadSinglePurchasedMessageDRMVideo(
|
|
||||||
policy,
|
|
||||||
signature,
|
|
||||||
kvp,
|
|
||||||
mpdURL,
|
|
||||||
decryptionKey,
|
|
||||||
path,
|
|
||||||
lastModified,
|
|
||||||
paidMessageKVP.Key,
|
|
||||||
"Messages",
|
"Messages",
|
||||||
new SpectreProgressReporter(task),
|
new SpectreProgressReporter(task), singlePaidMsgPath + "/Videos", filenameFormat,
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
messageInfo, mediaInfo, messageInfo?.FromUser, hasSelectedUsersKVP.Value);
|
||||||
.PaidMessageFileNameFormat ?? "",
|
|
||||||
messageInfo,
|
|
||||||
mediaInfo,
|
|
||||||
messageInfo?.FromUser,
|
|
||||||
hasSelectedUsersKVP.Value);
|
|
||||||
|
|
||||||
if (isNew)
|
|
||||||
{
|
|
||||||
newPaidMessagesCount++;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
oldPaidMessagesCount++;
|
isNew = await downloadService.DownloadMedia(paidMessageKVP.Value, path,
|
||||||
}
|
paidMessageKVP.Key, "Messages", new SpectreProgressReporter(task),
|
||||||
}
|
singlePaidMsgPath, filenameFormat, messageInfo, mediaInfo, messageInfo?.FromUser,
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageEntities.Medium? mediaInfo =
|
|
||||||
singlePaidMessageCollection.SingleMessageMedia.FirstOrDefault(m =>
|
|
||||||
m.Id == paidMessageKVP.Key);
|
|
||||||
MessageEntities.SingleMessage? messageInfo =
|
|
||||||
singlePaidMessageCollection.SingleMessageObjects.FirstOrDefault(p =>
|
|
||||||
p?.Media?.Any(m => m.Id == paidMessageKVP.Key) == true);
|
|
||||||
|
|
||||||
isNew = await downloadService.DownloadSinglePurchasedMedia(
|
|
||||||
paidMessageKVP.Value,
|
|
||||||
path,
|
|
||||||
paidMessageKVP.Key,
|
|
||||||
"Messages",
|
|
||||||
new SpectreProgressReporter(task),
|
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
|
||||||
.PaidMessageFileNameFormat ?? "",
|
|
||||||
messageInfo,
|
|
||||||
mediaInfo,
|
|
||||||
messageInfo?.FromUser,
|
|
||||||
hasSelectedUsersKVP.Value);
|
hasSelectedUsersKVP.Value);
|
||||||
if (isNew)
|
if (isNew)
|
||||||
{
|
{
|
||||||
@ -2162,83 +1958,39 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
task.StartTask();
|
task.StartTask();
|
||||||
foreach (KeyValuePair<long, string> postKVP in post.SinglePosts)
|
foreach (KeyValuePair<long, string> postKVP in post.SinglePosts)
|
||||||
{
|
{
|
||||||
|
PostEntities.Medium? mediaInfo = post.SinglePostMedia.FirstOrDefault(m => m.Id == postKVP.Key);
|
||||||
|
PostEntities.SinglePost? postInfo =
|
||||||
|
post.SinglePostObjects.FirstOrDefault(p => p?.Media?.Contains(mediaInfo) == true);
|
||||||
|
string filenameFormat = configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
||||||
|
.PostFileNameFormat ?? "";
|
||||||
|
string postPath = configService.CurrentConfig.FolderPerPost && postInfo != null &&
|
||||||
|
postInfo?.Id is not null && postInfo?.PostedAt is not null
|
||||||
|
? $"/Posts/Free/{postInfo.Id} {postInfo.PostedAt:yyyy-MM-dd HH-mm-ss}"
|
||||||
|
: "/Posts/Free";
|
||||||
|
|
||||||
if (postKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
if (postKVP.Value.Contains("cdn3.onlyfans.com/dash/files"))
|
||||||
{
|
{
|
||||||
string[] messageUrlParsed = postKVP.Value.Split(',');
|
string[] parsed = postKVP.Value.Split(',');
|
||||||
string mpdURL = messageUrlParsed[0];
|
(string decryptionKey, DateTime lastModified)? drmInfo =
|
||||||
string policy = messageUrlParsed[1];
|
await downloadService.GetDecryptionInfo(parsed[0], parsed[1], parsed[2], parsed[3],
|
||||||
string signature = messageUrlParsed[2];
|
parsed[4], parsed[5], "post", clientIdBlobMissing, devicePrivateKeyMissing);
|
||||||
string kvp = messageUrlParsed[3];
|
if (drmInfo == null)
|
||||||
string mediaId = messageUrlParsed[4];
|
|
||||||
string postId = messageUrlParsed[5];
|
|
||||||
string? licenseURL = null;
|
|
||||||
string? pssh = await apiService.GetDRMMPDPSSH(mpdURL, policy, signature, kvp);
|
|
||||||
if (pssh == null)
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
DateTime lastModified = await apiService.GetDRMMPDLastModified(mpdURL, policy, signature, kvp);
|
isNew = await downloadService.DownloadDRMVideo(parsed[1], parsed[2], parsed[3], parsed[0],
|
||||||
Dictionary<string, string> drmHeaders =
|
drmInfo.Value.decryptionKey, path, drmInfo.Value.lastModified, postKVP.Key, "Posts",
|
||||||
apiService.GetDynamicHeaders($"/api2/v2/users/media/{mediaId}/drm/post/{postId}",
|
new SpectreProgressReporter(task), postPath + "/Videos", filenameFormat,
|
||||||
"?type=widevine");
|
postInfo, mediaInfo, postInfo?.Author, users);
|
||||||
string decryptionKey;
|
|
||||||
if (clientIdBlobMissing || devicePrivateKeyMissing)
|
|
||||||
{
|
|
||||||
decryptionKey = await apiService.GetDecryptionKeyOFDL(drmHeaders,
|
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/post/{postId}?type=widevine",
|
|
||||||
pssh);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
decryptionKey = await apiService.GetDecryptionKeyCDM(drmHeaders,
|
|
||||||
$"https://onlyfans.com/api2/v2/users/media/{mediaId}/drm/post/{postId}?type=widevine",
|
|
||||||
pssh);
|
|
||||||
}
|
|
||||||
|
|
||||||
PostEntities.Medium mediaInfo = post.SinglePostMedia.FirstOrDefault(m => m.Id == postKVP.Key);
|
|
||||||
PostEntities.SinglePost postInfo =
|
|
||||||
post.SinglePostObjects.FirstOrDefault(p => p?.Media?.Contains(mediaInfo) == true);
|
|
||||||
|
|
||||||
isNew = await downloadService.DownloadPostDRMVideo(
|
|
||||||
policy,
|
|
||||||
signature,
|
|
||||||
kvp,
|
|
||||||
mpdURL,
|
|
||||||
decryptionKey,
|
|
||||||
path,
|
|
||||||
lastModified,
|
|
||||||
postKVP.Key,
|
|
||||||
"Posts",
|
|
||||||
new SpectreProgressReporter(task),
|
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username).PostFileNameFormat ??
|
|
||||||
"",
|
|
||||||
postInfo,
|
|
||||||
mediaInfo,
|
|
||||||
postInfo?.Author,
|
|
||||||
users);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PostEntities.Medium? mediaInfo =
|
isNew = await downloadService.DownloadMedia(postKVP.Value, path,
|
||||||
post.SinglePostMedia.FirstOrDefault(m => m.Id == postKVP.Key);
|
postKVP.Key, "Posts", new SpectreProgressReporter(task),
|
||||||
PostEntities.SinglePost? postInfo =
|
postPath, filenameFormat, postInfo, mediaInfo, postInfo?.Author, users);
|
||||||
post.SinglePostObjects.FirstOrDefault(p => p?.Media?.Contains(mediaInfo) == true);
|
|
||||||
|
|
||||||
isNew = await downloadService.DownloadPostMedia(
|
|
||||||
postKVP.Value,
|
|
||||||
path,
|
|
||||||
postKVP.Key,
|
|
||||||
"Posts",
|
|
||||||
new SpectreProgressReporter(task),
|
|
||||||
configService.CurrentConfig.GetCreatorFileNameFormatConfig(username)
|
|
||||||
.PostFileNameFormat ?? "",
|
|
||||||
postInfo,
|
|
||||||
mediaInfo,
|
|
||||||
postInfo?.Author,
|
|
||||||
users);
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,5 @@
|
|||||||
using OF_DL.Models;
|
using OF_DL.Models;
|
||||||
using ArchivedEntities = OF_DL.Models.Entities.Archived;
|
using ArchivedEntities = OF_DL.Models.Entities.Archived;
|
||||||
using CommonEntities = OF_DL.Models.Entities.Common;
|
|
||||||
using MessageEntities = OF_DL.Models.Entities.Messages;
|
using MessageEntities = OF_DL.Models.Entities.Messages;
|
||||||
using PostEntities = OF_DL.Models.Entities.Posts;
|
using PostEntities = OF_DL.Models.Entities.Posts;
|
||||||
using PurchasedEntities = OF_DL.Models.Entities.Purchased;
|
using PurchasedEntities = OF_DL.Models.Entities.Purchased;
|
||||||
@ -15,105 +14,24 @@ public interface IDownloadService
|
|||||||
Task<bool> ProcessMediaDownload(string folder, long media_id, string api_type, string url, string path,
|
Task<bool> ProcessMediaDownload(string folder, long media_id, string api_type, string url, string path,
|
||||||
string serverFileName, string resolvedFileName, string extension, IProgressReporter progressReporter);
|
string serverFileName, string resolvedFileName, string extension, IProgressReporter progressReporter);
|
||||||
|
|
||||||
Task<bool> DownloadArchivedMedia(string url, string folder, long media_id, string api_type,
|
Task<bool> DownloadMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, ArchivedEntities.ListItem? messageInfo,
|
IProgressReporter progressReporter, string path,
|
||||||
ArchivedEntities.Medium? messageMedia, CommonEntities.Author? author,
|
string? filenameFormat, object? postInfo, object? postMedia,
|
||||||
Dictionary<string, long> users);
|
object? author, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadArchivedPostDRMVideo(string policy, string signature, string kvp, string url,
|
Task<bool> DownloadDRMVideo(string policy, string signature, string kvp, string url,
|
||||||
string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, ArchivedEntities.ListItem? postInfo,
|
IProgressReporter progressReporter, string path,
|
||||||
ArchivedEntities.Medium? postMedia,
|
string? filenameFormat, object? postInfo, object? postMedia,
|
||||||
CommonEntities.Author? author, Dictionary<string, long> users);
|
object? author, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadPostDRMVideo(string policy, string signature, string kvp, string url, string decryptionKey,
|
Task<(string decryptionKey, DateTime lastModified)?> GetDecryptionInfo(
|
||||||
string folder, DateTime lastModified, long media_id, string api_type, IProgressReporter progressReporter,
|
string mpdURL, string policy, string signature, string kvp,
|
||||||
string filenameFormat, PostEntities.SinglePost postInfo, PostEntities.Medium postMedia,
|
string mediaId, string contentId, string drmType,
|
||||||
CommonEntities.Author author,
|
bool clientIdBlobMissing, bool devicePrivateKeyMissing);
|
||||||
Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadPostDRMVideo(string policy, string signature, string kvp, string url, string decryptionKey,
|
|
||||||
string folder, DateTime lastModified, long media_id, string api_type, IProgressReporter progressReporter,
|
|
||||||
string? filenameFormat, PostEntities.ListItem? postInfo, PostEntities.Medium? postMedia,
|
|
||||||
CommonEntities.Author? author,
|
|
||||||
Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task DownloadAvatarHeader(string? avatarUrl, string? headerUrl, string folder, string username);
|
Task DownloadAvatarHeader(string? avatarUrl, string? headerUrl, string folder, string username);
|
||||||
|
|
||||||
Task<bool> DownloadMessageDRMVideo(string policy, string signature, string kvp, string url, string decryptionKey,
|
|
||||||
string folder, DateTime lastModified, long media_id, string api_type, IProgressReporter progressReporter,
|
|
||||||
string? filenameFormat, MessageEntities.ListItem? messageInfo, MessageEntities.Medium? messageMedia,
|
|
||||||
CommonEntities.FromUser? fromUser,
|
|
||||||
Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadMessageMedia(string url, string folder, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, MessageEntities.ListItem? messageInfo,
|
|
||||||
MessageEntities.Medium? messageMedia, CommonEntities.FromUser? fromUser, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadPostMedia(string url, string folder, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, PostEntities.ListItem? postInfo,
|
|
||||||
PostEntities.Medium? postMedia,
|
|
||||||
CommonEntities.Author? author, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadPostMedia(string url, string folder, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, PostEntities.SinglePost? postInfo,
|
|
||||||
PostEntities.Medium? postMedia,
|
|
||||||
CommonEntities.Author? author, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadPurchasedMedia(string url, string folder, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, PurchasedEntities.ListItem? messageInfo,
|
|
||||||
MessageEntities.Medium? messageMedia,
|
|
||||||
CommonEntities.FromUser? fromUser, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadSinglePurchasedMedia(string url, string folder, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, MessageEntities.SingleMessage? messageInfo,
|
|
||||||
MessageEntities.Medium? messageMedia, CommonEntities.FromUser? fromUser, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadPurchasedMessageDRMVideo(string policy, string signature, string kvp, string url,
|
|
||||||
string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, PurchasedEntities.ListItem? messageInfo,
|
|
||||||
MessageEntities.Medium? messageMedia,
|
|
||||||
CommonEntities.FromUser? fromUser, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadSinglePurchasedMessageDRMVideo(string policy, string signature, string kvp, string url,
|
|
||||||
string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, MessageEntities.SingleMessage? messageInfo,
|
|
||||||
MessageEntities.Medium? messageMedia, CommonEntities.FromUser? fromUser, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadPurchasedPostDRMVideo(string policy, string signature, string kvp, string url,
|
|
||||||
string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, PurchasedEntities.ListItem? postInfo,
|
|
||||||
MessageEntities.Medium? postMedia,
|
|
||||||
CommonEntities.FromUser? fromUser, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadPurchasedPostMedia(string url, string folder, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, PurchasedEntities.ListItem? messageInfo,
|
|
||||||
MessageEntities.Medium? messageMedia,
|
|
||||||
CommonEntities.FromUser? fromUser, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadStoryMedia(string url, string folder, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter);
|
|
||||||
|
|
||||||
Task<bool> DownloadStreamMedia(string url, string folder, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, StreamEntities.ListItem? streamInfo,
|
|
||||||
StreamEntities.Medium? streamMedia, CommonEntities.Author? author,
|
|
||||||
Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadStreamsDRMVideo(string policy, string signature, string kvp, string url, string decryptionKey,
|
|
||||||
string folder, DateTime lastModified, long media_id, string api_type, IProgressReporter progressReporter,
|
|
||||||
string? filenameFormat, StreamEntities.ListItem? streamInfo, StreamEntities.Medium? streamMedia,
|
|
||||||
CommonEntities.Author? author,
|
|
||||||
Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadSingleMessagePreviewDRMVideo(string policy, string signature, string kvp, string url,
|
|
||||||
string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, MessageEntities.SingleMessage? messageInfo,
|
|
||||||
MessageEntities.Medium? messageMedia, CommonEntities.FromUser? fromUser, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<bool> DownloadMessagePreviewMedia(string url, string folder, long media_id, string api_type,
|
|
||||||
IProgressReporter progressReporter, string? filenameFormat, MessageEntities.SingleMessage? messageInfo,
|
|
||||||
MessageEntities.Medium? messageMedia, CommonEntities.FromUser? fromUser, Dictionary<string, long> users);
|
|
||||||
|
|
||||||
Task<DownloadResult> DownloadHighlights(string username, long userId, string path, HashSet<long> paidPostIds,
|
Task<DownloadResult> DownloadHighlights(string username, long userId, string path, HashSet<long> paidPostIds,
|
||||||
IProgressReporter progressReporter);
|
IProgressReporter progressReporter);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user