Major refactor #141
@ -1,262 +0,0 @@
|
|||||||
using Newtonsoft.Json;
|
|
||||||
using OF_DL.Utils;
|
|
||||||
|
|
||||||
namespace OF_DL.Models.Archived;
|
|
||||||
|
|
||||||
public class Archived
|
|
||||||
{
|
|
||||||
public List<List> list { get; set; }
|
|
||||||
public bool hasMore { get; set; }
|
|
||||||
public string headMarker { get; set; }
|
|
||||||
public string tailMarker { get; set; }
|
|
||||||
public Counters counters { get; set; }
|
|
||||||
|
|
||||||
public class Author
|
|
||||||
{
|
|
||||||
public long id { get; set; }
|
|
||||||
public string _view { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Counters
|
|
||||||
{
|
|
||||||
public int? audiosCount { get; set; }
|
|
||||||
public int? photosCount { get; set; }
|
|
||||||
public int? videosCount { get; set; }
|
|
||||||
public int? mediasCount { get; set; }
|
|
||||||
public int? postsCount { get; set; }
|
|
||||||
public int? streamsCount { get; set; }
|
|
||||||
public int? archivedPostsCount { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Dash
|
|
||||||
{
|
|
||||||
[JsonProperty("CloudFront-Policy")] public string CloudFrontPolicy { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("CloudFront-Signature")] public string CloudFrontSignature { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("CloudFront-Key-Pair-Id")]
|
|
||||||
public string CloudFrontKeyPairId { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Drm
|
|
||||||
{
|
|
||||||
public Manifest manifest { get; set; }
|
|
||||||
public Signature signature { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Files
|
|
||||||
{
|
|
||||||
public Full full { get; set; }
|
|
||||||
public Thumb thumb { get; set; }
|
|
||||||
public Preview preview { get; set; }
|
|
||||||
public SquarePreview squarePreview { get; set; }
|
|
||||||
public Drm drm { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Full
|
|
||||||
{
|
|
||||||
public string url { get; set; }
|
|
||||||
public int width { get; set; }
|
|
||||||
public int height { get; set; }
|
|
||||||
public long size { get; set; }
|
|
||||||
public List<object> sources { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class SquarePreview
|
|
||||||
{
|
|
||||||
public string url { get; set; }
|
|
||||||
public int width { get; set; }
|
|
||||||
public int height { get; set; }
|
|
||||||
public long size { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Thumb
|
|
||||||
{
|
|
||||||
public string url { get; set; }
|
|
||||||
public int width { get; set; }
|
|
||||||
public int height { get; set; }
|
|
||||||
public long size { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Hls
|
|
||||||
{
|
|
||||||
[JsonProperty("CloudFront-Policy")] public string CloudFrontPolicy { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("CloudFront-Signature")] public string CloudFrontSignature { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("CloudFront-Key-Pair-Id")]
|
|
||||||
public string CloudFrontKeyPairId { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Info
|
|
||||||
{
|
|
||||||
public Source source { get; set; }
|
|
||||||
public Preview preview { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LinkedPost
|
|
||||||
{
|
|
||||||
private string _rawText;
|
|
||||||
public string responseType { get; set; }
|
|
||||||
public long? id { get; set; }
|
|
||||||
public DateTime? postedAt { get; set; }
|
|
||||||
public string postedAtPrecise { get; set; }
|
|
||||||
public object expiredAt { get; set; }
|
|
||||||
public Author author { get; set; }
|
|
||||||
public string text { get; set; }
|
|
||||||
|
|
||||||
public string rawText
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(_rawText))
|
|
||||||
{
|
|
||||||
_rawText = XmlUtils.EvaluateInnerText(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _rawText;
|
|
||||||
}
|
|
||||||
set => _rawText = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool? lockedText { get; set; }
|
|
||||||
public bool? isFavorite { get; set; }
|
|
||||||
public bool? canReport { get; set; }
|
|
||||||
public bool? canDelete { get; set; }
|
|
||||||
public bool? canComment { get; set; }
|
|
||||||
public bool? canEdit { get; set; }
|
|
||||||
public bool? isPinned { get; set; }
|
|
||||||
public int? favoritesCount { get; set; }
|
|
||||||
public int? mediaCount { get; set; }
|
|
||||||
public bool? isMediaReady { get; set; }
|
|
||||||
public object voting { get; set; }
|
|
||||||
public bool? isOpened { get; set; }
|
|
||||||
public bool? canToggleFavorite { get; set; }
|
|
||||||
public object streamId { get; set; }
|
|
||||||
public string? price { get; set; }
|
|
||||||
public bool? hasVoting { get; set; }
|
|
||||||
public bool? isAddedToBookmarks { get; set; }
|
|
||||||
public bool? isArchived { get; set; }
|
|
||||||
public bool? isPrivateArchived { get; set; }
|
|
||||||
public bool? isDeleted { get; set; }
|
|
||||||
public bool? hasUrl { get; set; }
|
|
||||||
public bool? isCouplePeopleMedia { get; set; }
|
|
||||||
public string cantCommentReason { get; set; }
|
|
||||||
public int? commentsCount { get; set; }
|
|
||||||
public List<object> mentionedUsers { get; set; }
|
|
||||||
public List<object> linkedUsers { get; set; }
|
|
||||||
public List<Medium> media { get; set; }
|
|
||||||
public bool? canViewMedia { get; set; }
|
|
||||||
public List<object> preview { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class List
|
|
||||||
{
|
|
||||||
private string _rawText;
|
|
||||||
public string responseType { get; set; }
|
|
||||||
public long id { get; set; }
|
|
||||||
public DateTime postedAt { get; set; }
|
|
||||||
public string postedAtPrecise { get; set; }
|
|
||||||
public object expiredAt { get; set; }
|
|
||||||
public Author author { get; set; }
|
|
||||||
public string text { get; set; }
|
|
||||||
|
|
||||||
public string rawText
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(_rawText))
|
|
||||||
{
|
|
||||||
_rawText = XmlUtils.EvaluateInnerText(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
return _rawText;
|
|
||||||
}
|
|
||||||
set => _rawText = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool? lockedText { get; set; }
|
|
||||||
public bool? isFavorite { get; set; }
|
|
||||||
public bool? canReport { get; set; }
|
|
||||||
public bool? canDelete { get; set; }
|
|
||||||
public bool? canComment { get; set; }
|
|
||||||
public bool? canEdit { get; set; }
|
|
||||||
public bool? isPinned { get; set; }
|
|
||||||
public int? favoritesCount { get; set; }
|
|
||||||
public int? mediaCount { get; set; }
|
|
||||||
public bool? isMediaReady { get; set; }
|
|
||||||
public object voting { get; set; }
|
|
||||||
public bool isOpened { get; set; }
|
|
||||||
public bool? canToggleFavorite { get; set; }
|
|
||||||
public object streamId { get; set; }
|
|
||||||
public string price { get; set; }
|
|
||||||
public bool? hasVoting { get; set; }
|
|
||||||
public bool? isAddedToBookmarks { get; set; }
|
|
||||||
public bool isArchived { get; set; }
|
|
||||||
public bool? isPrivateArchived { get; set; }
|
|
||||||
public bool? isDeleted { get; set; }
|
|
||||||
public bool? hasUrl { get; set; }
|
|
||||||
public bool? isCouplePeopleMedia { get; set; }
|
|
||||||
public int? commentsCount { get; set; }
|
|
||||||
public List<object> mentionedUsers { get; set; }
|
|
||||||
public List<object> linkedUsers { get; set; }
|
|
||||||
public List<Medium> media { get; set; }
|
|
||||||
public bool? canViewMedia { get; set; }
|
|
||||||
public List<object> preview { get; set; }
|
|
||||||
public string cantCommentReason { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Manifest
|
|
||||||
{
|
|
||||||
public string hls { get; set; }
|
|
||||||
public string dash { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Medium
|
|
||||||
{
|
|
||||||
public long id { get; set; }
|
|
||||||
public string type { get; set; }
|
|
||||||
public bool? convertedToVideo { get; set; }
|
|
||||||
public bool canView { get; set; }
|
|
||||||
public bool? hasError { get; set; }
|
|
||||||
public DateTime? createdAt { get; set; }
|
|
||||||
public Info info { get; set; }
|
|
||||||
public Source source { get; set; }
|
|
||||||
public string squarePreview { get; set; }
|
|
||||||
public string full { get; set; }
|
|
||||||
public string preview { get; set; }
|
|
||||||
public string thumb { get; set; }
|
|
||||||
public Files files { get; set; }
|
|
||||||
public VideoSources videoSources { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Preview
|
|
||||||
{
|
|
||||||
public int? width { get; set; }
|
|
||||||
public int? height { get; set; }
|
|
||||||
public int? size { get; set; }
|
|
||||||
public string url { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Signature
|
|
||||||
{
|
|
||||||
public Hls hls { get; set; }
|
|
||||||
public Dash dash { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Source
|
|
||||||
{
|
|
||||||
public string source { get; set; }
|
|
||||||
public int? width { get; set; }
|
|
||||||
public int? height { get; set; }
|
|
||||||
public int? size { get; set; }
|
|
||||||
public int? duration { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class VideoSources
|
|
||||||
{
|
|
||||||
[JsonProperty("720")] public string _720 { get; set; }
|
|
||||||
|
|
||||||
[JsonProperty("240")] public string _240 { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
namespace OF_DL.Models.Archived;
|
|
||||||
|
|
||||||
public class ArchivedCollection
|
|
||||||
{
|
|
||||||
public List<Archived.Medium> ArchivedPostMedia = new();
|
|
||||||
public List<Archived.List> ArchivedPostObjects = new();
|
|
||||||
public Dictionary<long, string> ArchivedPosts = new();
|
|
||||||
}
|
|
||||||
16
OF DL/Models/Dtos/Archived/ArchivedDto.cs
Normal file
16
OF DL/Models/Dtos/Archived/ArchivedDto.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Archived;
|
||||||
|
|
||||||
|
public class ArchivedDto
|
||||||
|
{
|
||||||
|
[JsonProperty("list")] public List<ListItemDto> List { get; set; } = [];
|
||||||
|
|
||||||
|
[JsonProperty("hasMore")] public bool HasMore { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("headMarker")] public string HeadMarker { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("tailMarker")] public string TailMarker { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("counters")] public CountersDto Counters { get; set; } = new();
|
||||||
|
}
|
||||||
20
OF DL/Models/Dtos/Archived/CountersDto.cs
Normal file
20
OF DL/Models/Dtos/Archived/CountersDto.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Archived;
|
||||||
|
|
||||||
|
public class CountersDto
|
||||||
|
{
|
||||||
|
[JsonProperty("audiosCount")] public int? AudiosCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("photosCount")] public int? PhotosCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("videosCount")] public int? VideosCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("mediasCount")] public int? MediasCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("postsCount")] public int? PostsCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("streamsCount")] public int? StreamsCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("archivedPostsCount")] public int? ArchivedPostsCount { get; set; }
|
||||||
|
}
|
||||||
11
OF DL/Models/Dtos/Archived/InfoDto.cs
Normal file
11
OF DL/Models/Dtos/Archived/InfoDto.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Archived;
|
||||||
|
|
||||||
|
public class InfoDto
|
||||||
|
{
|
||||||
|
[JsonProperty("source")] public SourceDto Source { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("preview")] public PreviewDto Preview { get; set; } = new();
|
||||||
|
}
|
||||||
96
OF DL/Models/Dtos/Archived/LinkedPostDto.cs
Normal file
96
OF DL/Models/Dtos/Archived/LinkedPostDto.cs
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using OF_DL.Models.Dtos.Common;
|
||||||
|
using OF_DL.Utils;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Archived;
|
||||||
|
|
||||||
|
public class LinkedPostDto
|
||||||
|
{
|
||||||
|
private string _rawText = "";
|
||||||
|
[JsonProperty("responseType")] public string ResponseType { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("id")] public long? Id { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("postedAt")] public DateTime? PostedAt { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("postedAtPrecise")] public string PostedAtPrecise { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("expiredAt")] public object ExpiredAt { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("author")] public AuthorDto Author { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("text")] public string Text { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("rawText")]
|
||||||
|
public string RawText
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_rawText))
|
||||||
|
{
|
||||||
|
_rawText = XmlUtils.EvaluateInnerText(Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _rawText;
|
||||||
|
}
|
||||||
|
set => _rawText = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty("lockedText")] public bool? LockedText { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isFavorite")] public bool? IsFavorite { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canReport")] public bool? CanReport { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canDelete")] public bool? CanDelete { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canComment")] public bool? CanComment { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canEdit")] public bool? CanEdit { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isPinned")] public bool? IsPinned { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("favoritesCount")] public int? FavoritesCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("mediaCount")] public int? MediaCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isMediaReady")] public bool? IsMediaReady { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("voting")] public object Voting { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("isOpened")] public bool? IsOpened { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canToggleFavorite")] public bool? CanToggleFavorite { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("streamId")] public object StreamId { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("price")] public string? Price { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("hasVoting")] public bool? HasVoting { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isAddedToBookmarks")] public bool? IsAddedToBookmarks { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isArchived")] public bool? IsArchived { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isPrivateArchived")] public bool? IsPrivateArchived { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isDeleted")] public bool? IsDeleted { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("hasUrl")] public bool? HasUrl { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isCouplePeopleMedia")] public bool? IsCouplePeopleMedia { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("cantCommentReason")] public string CantCommentReason { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("commentsCount")] public int? CommentsCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("mentionedUsers")] public List<object> MentionedUsers { get; set; } = [];
|
||||||
|
|
||||||
|
[JsonProperty("linkedUsers")] public List<object> LinkedUsers { get; set; } = [];
|
||||||
|
|
||||||
|
[JsonProperty("media")] public List<MediumDto> Media { get; set; } = [];
|
||||||
|
|
||||||
|
[JsonProperty("canViewMedia")] public bool? CanViewMedia { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("preview")] public List<object> Preview { get; set; } = [];
|
||||||
|
}
|
||||||
97
OF DL/Models/Dtos/Archived/ListItemDto.cs
Normal file
97
OF DL/Models/Dtos/Archived/ListItemDto.cs
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using OF_DL.Models.Dtos.Common;
|
||||||
|
using OF_DL.Utils;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Archived;
|
||||||
|
|
||||||
|
public class ListItemDto
|
||||||
|
{
|
||||||
|
private string _rawText = "";
|
||||||
|
|
||||||
|
[JsonProperty("responseType")] public string ResponseType { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("id")] public long Id { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("postedAt")] public DateTime PostedAt { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("postedAtPrecise")] public string PostedAtPrecise { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("expiredAt")] public object ExpiredAt { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("author")] public AuthorDto Author { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("text")] public string Text { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("rawText")]
|
||||||
|
public string RawText
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_rawText))
|
||||||
|
{
|
||||||
|
_rawText = XmlUtils.EvaluateInnerText(Text);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _rawText;
|
||||||
|
}
|
||||||
|
set => _rawText = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty("lockedText")] public bool? LockedText { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isFavorite")] public bool? IsFavorite { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canReport")] public bool? CanReport { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canDelete")] public bool? CanDelete { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canComment")] public bool? CanComment { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canEdit")] public bool? CanEdit { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isPinned")] public bool? IsPinned { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("favoritesCount")] public int? FavoritesCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("mediaCount")] public int? MediaCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isMediaReady")] public bool? IsMediaReady { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("voting")] public object Voting { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("isOpened")] public bool IsOpened { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canToggleFavorite")] public bool? CanToggleFavorite { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("streamId")] public object StreamId { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("price")] public string Price { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("hasVoting")] public bool? HasVoting { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isAddedToBookmarks")] public bool? IsAddedToBookmarks { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isArchived")] public bool IsArchived { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isPrivateArchived")] public bool? IsPrivateArchived { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isDeleted")] public bool? IsDeleted { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("hasUrl")] public bool? HasUrl { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("isCouplePeopleMedia")] public bool? IsCouplePeopleMedia { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("commentsCount")] public int? CommentsCount { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("mentionedUsers")] public List<object> MentionedUsers { get; set; } = [];
|
||||||
|
|
||||||
|
[JsonProperty("linkedUsers")] public List<object> LinkedUsers { get; set; } = [];
|
||||||
|
|
||||||
|
[JsonProperty("media")] public List<MediumDto> Media { get; set; } = [];
|
||||||
|
|
||||||
|
[JsonProperty("canViewMedia")] public bool? CanViewMedia { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("preview")] public List<object> Preview { get; set; } = [];
|
||||||
|
|
||||||
|
[JsonProperty("cantCommentReason")] public string CantCommentReason { get; set; } = "";
|
||||||
|
}
|
||||||
35
OF DL/Models/Dtos/Archived/MediumDto.cs
Normal file
35
OF DL/Models/Dtos/Archived/MediumDto.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Archived;
|
||||||
|
|
||||||
|
public class MediumDto
|
||||||
|
{
|
||||||
|
[JsonProperty("id")] public long Id { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("type")] public string Type { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("convertedToVideo")] public bool? ConvertedToVideo { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("canView")] public bool CanView { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("hasError")] public bool? HasError { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("createdAt")] public DateTime? CreatedAt { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("info")] public InfoDto Info { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("source")] public SourceDto Source { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("squarePreview")] public string SquarePreview { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("full")] public string Full { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("preview")] public string Preview { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("thumb")] public string Thumb { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("files")] public FilesDto Files { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("videoSources")] public VideoSourcesDto VideoSources { get; set; } = new();
|
||||||
|
}
|
||||||
10
OF DL/Models/Dtos/Common/AuthorDto.cs
Normal file
10
OF DL/Models/Dtos/Common/AuthorDto.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class AuthorDto
|
||||||
|
{
|
||||||
|
[JsonProperty("id")] public long Id { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("_view")] public string View { get; set; } = "";
|
||||||
|
}
|
||||||
13
OF DL/Models/Dtos/Common/DashDto.cs
Normal file
13
OF DL/Models/Dtos/Common/DashDto.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class DashDto
|
||||||
|
{
|
||||||
|
[JsonProperty("CloudFront-Policy")] public string CloudFrontPolicy { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("CloudFront-Signature")] public string CloudFrontSignature { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("CloudFront-Key-Pair-Id")]
|
||||||
|
public string CloudFrontKeyPairId { get; set; } = "";
|
||||||
|
}
|
||||||
11
OF DL/Models/Dtos/Common/DrmDto.cs
Normal file
11
OF DL/Models/Dtos/Common/DrmDto.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using OF_DL.Models.Dtos.Archived;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class DrmDto
|
||||||
|
{
|
||||||
|
[JsonProperty("manifest")] public ManifestDto Manifest { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("signature")] public SignatureDto Signature { get; set; } = new();
|
||||||
|
}
|
||||||
17
OF DL/Models/Dtos/Common/FilesDto.cs
Normal file
17
OF DL/Models/Dtos/Common/FilesDto.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class FilesDto
|
||||||
|
{
|
||||||
|
[JsonProperty("full")] public FullDto Full { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("thumb")] public ThumbDto Thumb { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("preview")] public PreviewDto Preview { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("squarePreview")] public SquarePreviewDto SquarePreview { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("drm")] public DrmDto Drm { get; set; } = new();
|
||||||
|
}
|
||||||
16
OF DL/Models/Dtos/Common/FullDto.cs
Normal file
16
OF DL/Models/Dtos/Common/FullDto.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class FullDto
|
||||||
|
{
|
||||||
|
[JsonProperty("url")] public string Url { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("width")] public int Width { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("height")] public int Height { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("size")] public long Size { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("sources")] public List<object> Sources { get; set; } = [];
|
||||||
|
}
|
||||||
13
OF DL/Models/Dtos/Common/HlsDto.cs
Normal file
13
OF DL/Models/Dtos/Common/HlsDto.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class HlsDto
|
||||||
|
{
|
||||||
|
[JsonProperty("CloudFront-Policy")] public string CloudFrontPolicy { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("CloudFront-Signature")] public string CloudFrontSignature { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("CloudFront-Key-Pair-Id")]
|
||||||
|
public string CloudFrontKeyPairId { get; set; } = "";
|
||||||
|
}
|
||||||
10
OF DL/Models/Dtos/Common/ManifestDto.cs
Normal file
10
OF DL/Models/Dtos/Common/ManifestDto.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class ManifestDto
|
||||||
|
{
|
||||||
|
[JsonProperty("hls")] public string Hls { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("dash")] public string Dash { get; set; } = "";
|
||||||
|
}
|
||||||
14
OF DL/Models/Dtos/Common/PreviewDto.cs
Normal file
14
OF DL/Models/Dtos/Common/PreviewDto.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class PreviewDto
|
||||||
|
{
|
||||||
|
[JsonProperty("width")] public int? Width { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("height")] public int? Height { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("size")] public int? Size { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("url")] public string Url { get; set; } = "";
|
||||||
|
}
|
||||||
10
OF DL/Models/Dtos/Common/SignatureDto.cs
Normal file
10
OF DL/Models/Dtos/Common/SignatureDto.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class SignatureDto
|
||||||
|
{
|
||||||
|
[JsonProperty("hls")] public HlsDto Hls { get; set; } = new();
|
||||||
|
|
||||||
|
[JsonProperty("dash")] public DashDto Dash { get; set; } = new();
|
||||||
|
}
|
||||||
18
OF DL/Models/Dtos/Common/SourceDto.cs
Normal file
18
OF DL/Models/Dtos/Common/SourceDto.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class SourceDto
|
||||||
|
{
|
||||||
|
[JsonProperty("url")] public string Url { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("width")] public int Width { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("height")] public int Height { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("duration")] public int Duration { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("size")] public long Size { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("sources")] public SourcesDto Sources { get; set; } = new();
|
||||||
|
}
|
||||||
14
OF DL/Models/Dtos/Common/SourcesDto.cs
Normal file
14
OF DL/Models/Dtos/Common/SourcesDto.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class SourcesDto
|
||||||
|
{
|
||||||
|
[JsonProperty("720")] public string _720 { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("240")] public string _240 { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("w150")] public string W150 { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("w480")] public string W480 { get; set; } = "";
|
||||||
|
}
|
||||||
14
OF DL/Models/Dtos/Common/SquarePreviewDto.cs
Normal file
14
OF DL/Models/Dtos/Common/SquarePreviewDto.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class SquarePreviewDto
|
||||||
|
{
|
||||||
|
[JsonProperty("url")] public string Url { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("width")] public int Width { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("height")] public int Height { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("size")] public long Size { get; set; }
|
||||||
|
}
|
||||||
14
OF DL/Models/Dtos/Common/ThumbDto.cs
Normal file
14
OF DL/Models/Dtos/Common/ThumbDto.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class ThumbDto
|
||||||
|
{
|
||||||
|
[JsonProperty("url")] public string Url { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("width")] public int Width { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("height")] public int Height { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("size")] public long Size { get; set; }
|
||||||
|
}
|
||||||
10
OF DL/Models/Dtos/Common/VideoSourcesDto.cs
Normal file
10
OF DL/Models/Dtos/Common/VideoSourcesDto.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Dtos.Common;
|
||||||
|
|
||||||
|
public class VideoSourcesDto
|
||||||
|
{
|
||||||
|
[JsonProperty("720")] public string _720 { get; set; } = "";
|
||||||
|
|
||||||
|
[JsonProperty("240")] public string _240 { get; set; } = "";
|
||||||
|
}
|
||||||
10
OF DL/Models/Entities/Archived/Archived.cs
Normal file
10
OF DL/Models/Entities/Archived/Archived.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace OF_DL.Models.Entities.Archived;
|
||||||
|
|
||||||
|
public class Archived
|
||||||
|
{
|
||||||
|
public List<ListItem> List { get; set; } = [];
|
||||||
|
|
||||||
|
public bool HasMore { get; set; }
|
||||||
|
|
||||||
|
public string? TailMarker { get; set; }
|
||||||
|
}
|
||||||
10
OF DL/Models/Entities/Archived/ArchivedCollection.cs
Normal file
10
OF DL/Models/Entities/Archived/ArchivedCollection.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace OF_DL.Models.Entities.Archived;
|
||||||
|
|
||||||
|
public class ArchivedCollection
|
||||||
|
{
|
||||||
|
public List<Medium> ArchivedPostMedia { get; set; } = [];
|
||||||
|
|
||||||
|
public List<ListItem> ArchivedPostObjects { get; set; } = [];
|
||||||
|
|
||||||
|
public Dictionary<long, string> ArchivedPosts { get; set; } = new();
|
||||||
|
}
|
||||||
24
OF DL/Models/Entities/Archived/ListItem.cs
Normal file
24
OF DL/Models/Entities/Archived/ListItem.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using OF_DL.Models.Entities.Common;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Entities.Archived;
|
||||||
|
|
||||||
|
public class ListItem
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public DateTime PostedAt { get; set; }
|
||||||
|
|
||||||
|
public Author? Author { get; set; }
|
||||||
|
|
||||||
|
public string? Text { get; set; }
|
||||||
|
|
||||||
|
public string? Price { get; set; }
|
||||||
|
|
||||||
|
public bool IsOpened { get; set; }
|
||||||
|
|
||||||
|
public bool IsArchived { get; set; }
|
||||||
|
|
||||||
|
public List<Medium>? Media { get; set; }
|
||||||
|
|
||||||
|
public List<object>? Preview { get; set; }
|
||||||
|
}
|
||||||
16
OF DL/Models/Entities/Archived/Medium.cs
Normal file
16
OF DL/Models/Entities/Archived/Medium.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using OF_DL.Models.Entities.Common;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Entities.Archived;
|
||||||
|
|
||||||
|
public class Medium
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
public string? Type { get; set; }
|
||||||
|
|
||||||
|
public bool CanView { get; set; }
|
||||||
|
|
||||||
|
public Files? Files { get; set; }
|
||||||
|
|
||||||
|
public string? Preview { get; set; }
|
||||||
|
}
|
||||||
6
OF DL/Models/Entities/Common/Author.cs
Normal file
6
OF DL/Models/Entities/Common/Author.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace OF_DL.Models.Entities.Common;
|
||||||
|
|
||||||
|
public class Author
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
}
|
||||||
10
OF DL/Models/Entities/Common/Dash.cs
Normal file
10
OF DL/Models/Entities/Common/Dash.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace OF_DL.Models.Entities.Common;
|
||||||
|
|
||||||
|
public class Dash
|
||||||
|
{
|
||||||
|
public string? CloudFrontPolicy { get; set; }
|
||||||
|
|
||||||
|
public string? CloudFrontSignature { get; set; }
|
||||||
|
|
||||||
|
public string? CloudFrontKeyPairId { get; set; }
|
||||||
|
}
|
||||||
8
OF DL/Models/Entities/Common/Drm.cs
Normal file
8
OF DL/Models/Entities/Common/Drm.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace OF_DL.Models.Entities.Common;
|
||||||
|
|
||||||
|
public class Drm
|
||||||
|
{
|
||||||
|
public Manifest? Manifest { get; set; }
|
||||||
|
|
||||||
|
public Signature? Signature { get; set; }
|
||||||
|
}
|
||||||
8
OF DL/Models/Entities/Common/Files.cs
Normal file
8
OF DL/Models/Entities/Common/Files.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace OF_DL.Models.Entities.Common;
|
||||||
|
|
||||||
|
public class Files
|
||||||
|
{
|
||||||
|
public Full? Full { get; set; }
|
||||||
|
|
||||||
|
public Drm? Drm { get; set; }
|
||||||
|
}
|
||||||
6
OF DL/Models/Entities/Common/Full.cs
Normal file
6
OF DL/Models/Entities/Common/Full.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace OF_DL.Models.Entities.Common;
|
||||||
|
|
||||||
|
public class Full
|
||||||
|
{
|
||||||
|
public string? Url { get; set; }
|
||||||
|
}
|
||||||
6
OF DL/Models/Entities/Common/Manifest.cs
Normal file
6
OF DL/Models/Entities/Common/Manifest.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace OF_DL.Models.Entities.Common;
|
||||||
|
|
||||||
|
public class Manifest
|
||||||
|
{
|
||||||
|
public string? Dash { get; set; }
|
||||||
|
}
|
||||||
6
OF DL/Models/Entities/Common/Signature.cs
Normal file
6
OF DL/Models/Entities/Common/Signature.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace OF_DL.Models.Entities.Common;
|
||||||
|
|
||||||
|
public class Signature
|
||||||
|
{
|
||||||
|
public Dash? Dash { get; set; }
|
||||||
|
}
|
||||||
137
OF DL/Models/Mappers/ArchivedMapper.cs
Normal file
137
OF DL/Models/Mappers/ArchivedMapper.cs
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
using OF_DL.Models.Dtos.Archived;
|
||||||
|
using OF_DL.Models.Dtos.Common;
|
||||||
|
using OF_DL.Models.Entities.Archived;
|
||||||
|
|
||||||
|
namespace OF_DL.Models.Mappers;
|
||||||
|
|
||||||
|
public static class ArchivedMapper
|
||||||
|
{
|
||||||
|
public static Archived FromDto(ArchivedDto? dto)
|
||||||
|
{
|
||||||
|
Archived mapped = new() { HasMore = dto?.HasMore ?? false, TailMarker = dto?.TailMarker };
|
||||||
|
|
||||||
|
if (dto?.List == null)
|
||||||
|
{
|
||||||
|
return mapped;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (ListItemDto entry in dto.List)
|
||||||
|
{
|
||||||
|
mapped.List.Add(MapList(entry));
|
||||||
|
}
|
||||||
|
|
||||||
|
return mapped;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ListItem MapList(ListItemDto dto) =>
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Id = dto.Id,
|
||||||
|
PostedAt = dto.PostedAt,
|
||||||
|
Author = MapAuthor(dto.Author),
|
||||||
|
Text = dto.Text,
|
||||||
|
Price = dto.Price,
|
||||||
|
IsOpened = dto.IsOpened,
|
||||||
|
IsArchived = dto.IsArchived,
|
||||||
|
Media = MapMedia(dto.Media),
|
||||||
|
Preview = dto.Preview
|
||||||
|
};
|
||||||
|
|
||||||
|
private static Entities.Common.Author? MapAuthor(AuthorDto? dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Entities.Common.Author { Id = dto.Id };
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<Medium>? MapMedia(List<MediumDto>? media)
|
||||||
|
{
|
||||||
|
if (media == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return media.Select(MapMedium).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Medium MapMedium(MediumDto dto) =>
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Id = dto.Id,
|
||||||
|
Type = dto.Type,
|
||||||
|
CanView = dto.CanView,
|
||||||
|
Files = MapFiles(dto.Files),
|
||||||
|
Preview = dto.Preview
|
||||||
|
};
|
||||||
|
|
||||||
|
private static Entities.Common.Files? MapFiles(FilesDto? dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Entities.Common.Files { Full = MapFull(dto.Full), Drm = MapDrm(dto.Drm) };
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Entities.Common.Full? MapFull(FullDto? dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Entities.Common.Full { Url = dto.Url };
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Entities.Common.Drm? MapDrm(DrmDto? dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Entities.Common.Drm
|
||||||
|
{
|
||||||
|
Manifest = MapManifest(dto.Manifest), Signature = MapSignature(dto.Signature)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Entities.Common.Manifest? MapManifest(ManifestDto? dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Entities.Common.Manifest { Dash = dto.Dash };
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Entities.Common.Signature? MapSignature(SignatureDto? dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Entities.Common.Signature { Dash = MapDash(dto.Dash) };
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Entities.Common.Dash? MapDash(DashDto? dto)
|
||||||
|
{
|
||||||
|
if (dto == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Entities.Common.Dash
|
||||||
|
{
|
||||||
|
CloudFrontPolicy = dto.CloudFrontPolicy,
|
||||||
|
CloudFrontSignature = dto.CloudFrontSignature,
|
||||||
|
CloudFrontKeyPairId = dto.CloudFrontKeyPairId
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,17 +7,16 @@ using Newtonsoft.Json;
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using OF_DL.CLI;
|
using OF_DL.CLI;
|
||||||
using OF_DL.Models;
|
using OF_DL.Models;
|
||||||
using OF_DL.Models.Archived;
|
|
||||||
using OF_DL.Models.Messages;
|
using OF_DL.Models.Messages;
|
||||||
using OF_DL.Models.Post;
|
using OF_DL.Models.Post;
|
||||||
using OF_DL.Models.Purchased;
|
using OF_DL.Models.Purchased;
|
||||||
using OF_DL.Models.Streams;
|
using OF_DL.Models.Streams;
|
||||||
using OF_DL.Enumerations;
|
using OF_DL.Enumerations;
|
||||||
using OF_DL.Helpers;
|
using OF_DL.Helpers;
|
||||||
|
using OF_DL.Models.Entities.Archived;
|
||||||
using OF_DL.Services;
|
using OF_DL.Services;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
using static OF_DL.Models.Messages.Messages;
|
|
||||||
using Constants = OF_DL.Widevine.Constants;
|
using Constants = OF_DL.Widevine.Constants;
|
||||||
|
|
||||||
namespace OF_DL;
|
namespace OF_DL;
|
||||||
@ -1522,7 +1521,7 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
pssh);
|
pssh);
|
||||||
}
|
}
|
||||||
|
|
||||||
Medium? mediaInfo =
|
Messages.Medium? mediaInfo =
|
||||||
purchasedPosts?.PaidPostMedia?.FirstOrDefault(m => m.id == purchasedPostKVP.Key);
|
purchasedPosts?.PaidPostMedia?.FirstOrDefault(m => m.id == purchasedPostKVP.Key);
|
||||||
Purchased.List? postInfo = mediaInfo != null
|
Purchased.List? postInfo = mediaInfo != null
|
||||||
? purchasedPosts?.PaidPostObjects?.FirstOrDefault(p =>
|
? purchasedPosts?.PaidPostObjects?.FirstOrDefault(p =>
|
||||||
@ -1557,7 +1556,7 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Medium? mediaInfo =
|
Messages.Medium? mediaInfo =
|
||||||
purchasedPosts?.PaidPostMedia?.FirstOrDefault(m => m.id == purchasedPostKVP.Key);
|
purchasedPosts?.PaidPostMedia?.FirstOrDefault(m => m.id == purchasedPostKVP.Key);
|
||||||
Purchased.List? postInfo = mediaInfo != null
|
Purchased.List? postInfo = mediaInfo != null
|
||||||
? purchasedPosts?.PaidPostObjects?.FirstOrDefault(p =>
|
? purchasedPosts?.PaidPostObjects?.FirstOrDefault(p =>
|
||||||
@ -1671,7 +1670,7 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
pssh);
|
pssh);
|
||||||
}
|
}
|
||||||
|
|
||||||
Medium? mediaInfo =
|
Messages.Medium? mediaInfo =
|
||||||
paidMessageCollection.PaidMessageMedia.FirstOrDefault(m =>
|
paidMessageCollection.PaidMessageMedia.FirstOrDefault(m =>
|
||||||
m.id == paidMessageKVP.Key);
|
m.id == paidMessageKVP.Key);
|
||||||
Purchased.List? messageInfo =
|
Purchased.List? messageInfo =
|
||||||
@ -1708,7 +1707,7 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Medium? mediaInfo =
|
Messages.Medium? mediaInfo =
|
||||||
paidMessageCollection.PaidMessageMedia.FirstOrDefault(m => m.id == paidMessageKVP.Key);
|
paidMessageCollection.PaidMessageMedia.FirstOrDefault(m => m.id == paidMessageKVP.Key);
|
||||||
Purchased.List messageInfo =
|
Purchased.List messageInfo =
|
||||||
paidMessageCollection.PaidMessageObjects.FirstOrDefault(p =>
|
paidMessageCollection.PaidMessageObjects.FirstOrDefault(p =>
|
||||||
@ -1898,7 +1897,7 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
pssh);
|
pssh);
|
||||||
}
|
}
|
||||||
|
|
||||||
Medium? mediaInfo =
|
Messages.Medium? mediaInfo =
|
||||||
singlePaidMessageCollection.PreviewSingleMessageMedia.FirstOrDefault(m =>
|
singlePaidMessageCollection.PreviewSingleMessageMedia.FirstOrDefault(m =>
|
||||||
m.id == paidMessageKVP.Key);
|
m.id == paidMessageKVP.Key);
|
||||||
SingleMessage? messageInfo =
|
SingleMessage? messageInfo =
|
||||||
@ -1935,7 +1934,7 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Medium? mediaInfo =
|
Messages.Medium? mediaInfo =
|
||||||
singlePaidMessageCollection.PreviewSingleMessageMedia.FirstOrDefault(m =>
|
singlePaidMessageCollection.PreviewSingleMessageMedia.FirstOrDefault(m =>
|
||||||
m.id == paidMessageKVP.Key);
|
m.id == paidMessageKVP.Key);
|
||||||
SingleMessage? messageInfo =
|
SingleMessage? messageInfo =
|
||||||
@ -2038,7 +2037,7 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
pssh);
|
pssh);
|
||||||
}
|
}
|
||||||
|
|
||||||
Medium? mediaInfo =
|
Messages.Medium? mediaInfo =
|
||||||
singlePaidMessageCollection.SingleMessageMedia.FirstOrDefault(m =>
|
singlePaidMessageCollection.SingleMessageMedia.FirstOrDefault(m =>
|
||||||
m.id == paidMessageKVP.Key);
|
m.id == paidMessageKVP.Key);
|
||||||
SingleMessage? messageInfo =
|
SingleMessage? messageInfo =
|
||||||
@ -2075,7 +2074,7 @@ public class Program(IServiceProvider serviceProvider)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Medium? mediaInfo =
|
Messages.Medium? mediaInfo =
|
||||||
singlePaidMessageCollection.SingleMessageMedia.FirstOrDefault(m =>
|
singlePaidMessageCollection.SingleMessageMedia.FirstOrDefault(m =>
|
||||||
m.id == paidMessageKVP.Key);
|
m.id == paidMessageKVP.Key);
|
||||||
SingleMessage? messageInfo =
|
SingleMessage? messageInfo =
|
||||||
|
|||||||
@ -6,7 +6,6 @@ using System.Xml.Linq;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using OF_DL.Models;
|
using OF_DL.Models;
|
||||||
using OF_DL.Models.Archived;
|
|
||||||
using OF_DL.Models.Highlights;
|
using OF_DL.Models.Highlights;
|
||||||
using OF_DL.Models.Lists;
|
using OF_DL.Models.Lists;
|
||||||
using OF_DL.Models.Messages;
|
using OF_DL.Models.Messages;
|
||||||
@ -15,6 +14,10 @@ using OF_DL.Models.Purchased;
|
|||||||
using OF_DL.Models.Stories;
|
using OF_DL.Models.Stories;
|
||||||
using OF_DL.Models.Streams;
|
using OF_DL.Models.Streams;
|
||||||
using OF_DL.Enumerations;
|
using OF_DL.Enumerations;
|
||||||
|
using OF_DL.Models.Dtos.Archived;
|
||||||
|
using OF_DL.Models.Entities;
|
||||||
|
using OF_DL.Models.Entities.Archived;
|
||||||
|
using OF_DL.Models.Mappers;
|
||||||
using OF_DL.Widevine;
|
using OF_DL.Widevine;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
@ -1390,28 +1393,31 @@ public class APIService(IAuthService authService, IConfigService configService,
|
|||||||
configService.CurrentConfig.CustomDate);
|
configService.CurrentConfig.CustomDate);
|
||||||
|
|
||||||
string? body = await BuildHeaderAndExecuteRequests(getParams, endpoint, GetHttpClient());
|
string? body = await BuildHeaderAndExecuteRequests(getParams, endpoint, GetHttpClient());
|
||||||
archived = JsonConvert.DeserializeObject<Archived>(body, m_JsonSerializerSettings);
|
ArchivedDto archivedDto = JsonConvert.DeserializeObject<ArchivedDto>(body, m_JsonSerializerSettings);
|
||||||
ctx.Status($"[red]Getting Archived Posts\n[/] [red]Found {archived.list.Count}[/]");
|
archived = ArchivedMapper.FromDto(archivedDto);
|
||||||
|
ctx.Status($"[red]Getting Archived Posts\n[/] [red]Found {archived.List.Count}[/]");
|
||||||
ctx.Spinner(Spinner.Known.Dots);
|
ctx.Spinner(Spinner.Known.Dots);
|
||||||
ctx.SpinnerStyle(Style.Parse("blue"));
|
ctx.SpinnerStyle(Style.Parse("blue"));
|
||||||
if (archived != null && archived.hasMore)
|
if (archived != null && archived.HasMore)
|
||||||
{
|
{
|
||||||
UpdateGetParamsForDateSelection(
|
UpdateGetParamsForDateSelection(
|
||||||
downloadDateSelection,
|
downloadDateSelection,
|
||||||
ref getParams,
|
ref getParams,
|
||||||
archived.tailMarker);
|
archived.TailMarker);
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
Archived newarchived = new();
|
Archived newarchived = new();
|
||||||
|
|
||||||
string? loopbody = await BuildHeaderAndExecuteRequests(getParams, endpoint, GetHttpClient());
|
string? loopbody = await BuildHeaderAndExecuteRequests(getParams, endpoint, GetHttpClient());
|
||||||
newarchived = JsonConvert.DeserializeObject<Archived>(loopbody, m_JsonSerializerSettings);
|
ArchivedDto newarchivedDto =
|
||||||
|
JsonConvert.DeserializeObject<ArchivedDto>(loopbody, m_JsonSerializerSettings);
|
||||||
|
newarchived = ArchivedMapper.FromDto(newarchivedDto);
|
||||||
|
|
||||||
archived.list.AddRange(newarchived.list);
|
archived.List.AddRange(newarchived.List);
|
||||||
ctx.Status($"[red]Getting Archived Posts\n[/] [red]Found {archived.list.Count}[/]");
|
ctx.Status($"[red]Getting Archived Posts\n[/] [red]Found {archived.List.Count}[/]");
|
||||||
ctx.Spinner(Spinner.Known.Dots);
|
ctx.Spinner(Spinner.Known.Dots);
|
||||||
ctx.SpinnerStyle(Style.Parse("blue"));
|
ctx.SpinnerStyle(Style.Parse("blue"));
|
||||||
if (!newarchived.hasMore)
|
if (!newarchived.HasMore)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1419,18 +1425,18 @@ public class APIService(IAuthService authService, IConfigService configService,
|
|||||||
UpdateGetParamsForDateSelection(
|
UpdateGetParamsForDateSelection(
|
||||||
downloadDateSelection,
|
downloadDateSelection,
|
||||||
ref getParams,
|
ref getParams,
|
||||||
newarchived.tailMarker);
|
newarchived.TailMarker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Archived.List archive in archived.list)
|
foreach (ListItem archive in archived.List)
|
||||||
{
|
{
|
||||||
List<long> previewids = new();
|
List<long> previewids = new();
|
||||||
if (archive.preview != null)
|
if (archive.Preview != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < archive.preview.Count; i++)
|
for (int i = 0; i < archive.Preview.Count; i++)
|
||||||
{
|
{
|
||||||
if (archive.preview[i] is long previewId)
|
if (archive.Preview[i] is long previewId)
|
||||||
{
|
{
|
||||||
if (!previewids.Contains(previewId))
|
if (!previewids.Contains(previewId))
|
||||||
{
|
{
|
||||||
@ -1440,61 +1446,61 @@ public class APIService(IAuthService authService, IConfigService configService,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await dbService.AddPost(folder, archive.id, archive.text != null ? archive.text : string.Empty,
|
await dbService.AddPost(folder, archive.Id, archive.Text != null ? archive.Text : string.Empty,
|
||||||
archive.price != null ? archive.price : "0",
|
archive.Price != null ? archive.Price : "0",
|
||||||
archive.price != null && archive.isOpened ? true : false, archive.isArchived, archive.postedAt);
|
archive.Price != null && archive.IsOpened ? true : false, archive.IsArchived, archive.PostedAt);
|
||||||
archivedCollection.ArchivedPostObjects.Add(archive);
|
archivedCollection.ArchivedPostObjects.Add(archive);
|
||||||
if (archive.media != null && archive.media.Count > 0)
|
if (archive.Media != null && archive.Media.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (Archived.Medium medium in archive.media)
|
foreach (Medium medium in archive.Media)
|
||||||
{
|
{
|
||||||
if (medium.type == "photo" && !configService.CurrentConfig.DownloadImages)
|
if (medium.Type == "photo" && !configService.CurrentConfig.DownloadImages)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (medium.type == "video" && !configService.CurrentConfig.DownloadVideos)
|
if (medium.Type == "video" && !configService.CurrentConfig.DownloadVideos)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (medium.type == "gif" && !configService.CurrentConfig.DownloadVideos)
|
if (medium.Type == "gif" && !configService.CurrentConfig.DownloadVideos)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (medium.type == "audio" && !configService.CurrentConfig.DownloadAudios)
|
if (medium.Type == "audio" && !configService.CurrentConfig.DownloadAudios)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (medium.canView && medium.files != null && medium.files.full != null &&
|
if (medium.CanView && medium.Files != null && medium.Files.Full != null &&
|
||||||
!string.IsNullOrEmpty(medium.files.full.url))
|
!string.IsNullOrEmpty(medium.Files.Full.Url))
|
||||||
{
|
{
|
||||||
if (!archivedCollection.ArchivedPosts.ContainsKey(medium.id))
|
if (!archivedCollection.ArchivedPosts.ContainsKey(medium.Id))
|
||||||
{
|
{
|
||||||
await dbService.AddMedia(folder, medium.id, archive.id, medium.files.full.url, null,
|
await dbService.AddMedia(folder, medium.Id, archive.Id, medium.Files.Full.Url, null,
|
||||||
null, null, "Posts",
|
null, null, "Posts",
|
||||||
medium.type == "photo" ? "Images" :
|
medium.Type == "photo" ? "Images" :
|
||||||
medium.type == "video" || medium.type == "gif" ? "Videos" :
|
medium.Type == "video" || medium.Type == "gif" ? "Videos" :
|
||||||
medium.type == "audio" ? "Audios" : null,
|
medium.Type == "audio" ? "Audios" : null,
|
||||||
previewids.Contains(medium.id) ? true : false, false, null);
|
previewids.Contains(medium.Id) ? true : false, false, null);
|
||||||
archivedCollection.ArchivedPosts.Add(medium.id, medium.files.full.url);
|
archivedCollection.ArchivedPosts.Add(medium.Id, medium.Files.Full.Url);
|
||||||
archivedCollection.ArchivedPostMedia.Add(medium);
|
archivedCollection.ArchivedPostMedia.Add(medium);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (medium.canView && medium.files != null && medium.files.drm != null)
|
else if (medium.CanView && medium.Files != null && medium.Files.Drm != null)
|
||||||
{
|
{
|
||||||
if (!archivedCollection.ArchivedPosts.ContainsKey(medium.id))
|
if (!archivedCollection.ArchivedPosts.ContainsKey(medium.Id))
|
||||||
{
|
{
|
||||||
await dbService.AddMedia(folder, medium.id, archive.id, medium.files.drm.manifest.dash,
|
await dbService.AddMedia(folder, medium.Id, archive.Id, medium.Files.Drm.Manifest.Dash,
|
||||||
null, null, null, "Posts",
|
null, null, null, "Posts",
|
||||||
medium.type == "photo" ? "Images" :
|
medium.Type == "photo" ? "Images" :
|
||||||
medium.type == "video" || medium.type == "gif" ? "Videos" :
|
medium.Type == "video" || medium.Type == "gif" ? "Videos" :
|
||||||
medium.type == "audio" ? "Audios" : null,
|
medium.Type == "audio" ? "Audios" : null,
|
||||||
previewids.Contains(medium.id) ? true : false, false, null);
|
previewids.Contains(medium.Id) ? true : false, false, null);
|
||||||
archivedCollection.ArchivedPosts.Add(medium.id,
|
archivedCollection.ArchivedPosts.Add(medium.Id,
|
||||||
$"{medium.files.drm.manifest.dash},{medium.files.drm.signature.dash.CloudFrontPolicy},{medium.files.drm.signature.dash.CloudFrontSignature},{medium.files.drm.signature.dash.CloudFrontKeyPairId},{medium.id},{archive.id}");
|
$"{medium.Files.Drm.Manifest.Dash},{medium.Files.Drm.Signature.Dash.CloudFrontPolicy},{medium.Files.Drm.Signature.Dash.CloudFrontSignature},{medium.Files.Drm.Signature.Dash.CloudFrontKeyPairId},{medium.Id},{archive.Id}");
|
||||||
archivedCollection.ArchivedPostMedia.Add(medium);
|
archivedCollection.ArchivedPostMedia.Add(medium);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,12 +4,13 @@ using System.Xml.Linq;
|
|||||||
using FFmpeg.NET;
|
using FFmpeg.NET;
|
||||||
using FFmpeg.NET.Events;
|
using FFmpeg.NET.Events;
|
||||||
using OF_DL.Models;
|
using OF_DL.Models;
|
||||||
using OF_DL.Models.Archived;
|
|
||||||
using OF_DL.Models.Messages;
|
using OF_DL.Models.Messages;
|
||||||
using OF_DL.Models.Post;
|
using OF_DL.Models.Post;
|
||||||
using OF_DL.Models.Purchased;
|
using OF_DL.Models.Purchased;
|
||||||
using OF_DL.Models.Streams;
|
using OF_DL.Models.Streams;
|
||||||
using OF_DL.Enumerations;
|
using OF_DL.Enumerations;
|
||||||
|
using OF_DL.Models.Entities;
|
||||||
|
using OF_DL.Models.Entities.Archived;
|
||||||
using OF_DL.Utils;
|
using OF_DL.Utils;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
@ -1036,7 +1037,7 @@ public class DownloadService(
|
|||||||
|
|
||||||
|
|
||||||
public async Task<bool> DownloadMessageMedia(string url, string folder, long media_id, string api_type,
|
public async Task<bool> DownloadMessageMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, List? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, List? messageInfo, Messages.Medium? messageMedia,
|
||||||
Messages.FromUser? fromUser, Dictionary<string, long> users)
|
Messages.FromUser? fromUser, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
string path;
|
string path;
|
||||||
@ -1059,7 +1060,8 @@ public class DownloadService(
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> DownloadMessagePreviewMedia(string url, string folder, long media_id, string api_type,
|
public async Task<bool> DownloadMessagePreviewMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
FromUser? fromUser, Dictionary<string, long> users)
|
FromUser? fromUser, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
string path;
|
string path;
|
||||||
@ -1083,8 +1085,9 @@ public class DownloadService(
|
|||||||
|
|
||||||
|
|
||||||
public async Task<bool> DownloadArchivedMedia(string url, string folder, long media_id, string api_type,
|
public async Task<bool> DownloadArchivedMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, Archived.List? messageInfo,
|
IProgressReporter progressReporter, string? filenameFormat, ListItem? messageInfo,
|
||||||
Archived.Medium? messageMedia, Archived.Author? author, Dictionary<string, long> users)
|
OF_DL.Models.Entities.Archived.Medium? messageMedia, Models.Entities.Common.Author? author,
|
||||||
|
Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
string path = "/Archived/Posts/Free";
|
string path = "/Archived/Posts/Free";
|
||||||
Uri uri = new(url);
|
Uri uri = new(url);
|
||||||
@ -1107,7 +1110,8 @@ public class DownloadService(
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> DownloadPurchasedMedia(string url, string folder, long media_id, string api_type,
|
public async Task<bool> DownloadPurchasedMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
Purchased.FromUser? fromUser, Dictionary<string, long> users)
|
Purchased.FromUser? fromUser, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
string path;
|
string path;
|
||||||
@ -1130,7 +1134,8 @@ public class DownloadService(
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> DownloadSinglePurchasedMedia(string url, string folder, long media_id, string api_type,
|
public async Task<bool> DownloadSinglePurchasedMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
FromUser? fromUser, Dictionary<string, long> users)
|
FromUser? fromUser, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
string path;
|
string path;
|
||||||
@ -1159,7 +1164,7 @@ public class DownloadService(
|
|||||||
IProgressReporter progressReporter,
|
IProgressReporter progressReporter,
|
||||||
string? filenameFormat,
|
string? filenameFormat,
|
||||||
Purchased.List? messageInfo,
|
Purchased.List? messageInfo,
|
||||||
Medium? messageMedia,
|
Messages.Medium? messageMedia,
|
||||||
Purchased.FromUser? fromUser,
|
Purchased.FromUser? fromUser,
|
||||||
Dictionary<string, long> users)
|
Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
@ -1189,7 +1194,7 @@ public class DownloadService(
|
|||||||
|
|
||||||
public async Task<bool> DownloadMessageDRMVideo(string policy, string signature, string kvp, string url,
|
public async Task<bool> DownloadMessageDRMVideo(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, List? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, List? messageInfo, Messages.Medium? messageMedia,
|
||||||
Messages.FromUser? fromUser, Dictionary<string, long> users)
|
Messages.FromUser? fromUser, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -1318,7 +1323,8 @@ public class DownloadService(
|
|||||||
|
|
||||||
public async Task<bool> DownloadSingleMessagePreviewDRMVideo(string policy, string signature, string kvp,
|
public async Task<bool> DownloadSingleMessagePreviewDRMVideo(string policy, string signature, string kvp,
|
||||||
string url, string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
string url, string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
FromUser? fromUser, Dictionary<string, long> users)
|
FromUser? fromUser, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -1448,7 +1454,8 @@ public class DownloadService(
|
|||||||
|
|
||||||
public async Task<bool> DownloadPurchasedMessageDRMVideo(string policy, string signature, string kvp, string url,
|
public async Task<bool> DownloadPurchasedMessageDRMVideo(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, Purchased.List? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
Purchased.FromUser? fromUser, Dictionary<string, long> users)
|
Purchased.FromUser? fromUser, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -1576,7 +1583,8 @@ public class DownloadService(
|
|||||||
|
|
||||||
public async Task<bool> DownloadSinglePurchasedMessageDRMVideo(string policy, string signature, string kvp,
|
public async Task<bool> DownloadSinglePurchasedMessageDRMVideo(string policy, string signature, string kvp,
|
||||||
string url, string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
string url, string decryptionKey, string folder, DateTime lastModified, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
FromUser? fromUser, Dictionary<string, long> users)
|
FromUser? fromUser, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -2089,7 +2097,8 @@ public class DownloadService(
|
|||||||
|
|
||||||
public async Task<bool> DownloadPurchasedPostDRMVideo(string policy, string signature, string kvp, string url,
|
public async Task<bool> DownloadPurchasedPostDRMVideo(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, Purchased.List? postInfo, Medium? postMedia,
|
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? postInfo,
|
||||||
|
Messages.Medium? postMedia,
|
||||||
Purchased.FromUser? fromUser, Dictionary<string, long> users)
|
Purchased.FromUser? fromUser, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -2219,8 +2228,9 @@ public class DownloadService(
|
|||||||
|
|
||||||
public async Task<bool> DownloadArchivedPostDRMVideo(string policy, string signature, string kvp, string url,
|
public async Task<bool> DownloadArchivedPostDRMVideo(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, Archived.List? postInfo, Archived.Medium? postMedia,
|
IProgressReporter progressReporter, string? filenameFormat, ListItem? postInfo,
|
||||||
Archived.Author? author, Dictionary<string, long> users)
|
OF_DL.Models.Entities.Archived.Medium? postMedia,
|
||||||
|
Models.Entities.Common.Author? author, Dictionary<string, long> users)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -2502,10 +2512,10 @@ public class DownloadService(
|
|||||||
pssh);
|
pssh);
|
||||||
}
|
}
|
||||||
|
|
||||||
Archived.Medium? mediaInfo =
|
OF_DL.Models.Entities.Archived.Medium? mediaInfo =
|
||||||
archived.ArchivedPostMedia.FirstOrDefault(m => m.id == archivedKVP.Key);
|
archived.ArchivedPostMedia.FirstOrDefault(m => m.Id == archivedKVP.Key);
|
||||||
Archived.List? postInfo =
|
ListItem? postInfo =
|
||||||
archived.ArchivedPostObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
archived.ArchivedPostObjects.FirstOrDefault(p => p?.Media?.Contains(mediaInfo) == true);
|
||||||
|
|
||||||
isNew = await DownloadArchivedPostDRMVideo(
|
isNew = await DownloadArchivedPostDRMVideo(
|
||||||
policy,
|
policy,
|
||||||
@ -2522,7 +2532,7 @@ public class DownloadService(
|
|||||||
string.Empty,
|
string.Empty,
|
||||||
postInfo,
|
postInfo,
|
||||||
mediaInfo,
|
mediaInfo,
|
||||||
postInfo?.author,
|
postInfo?.Author,
|
||||||
users);
|
users);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2532,9 +2542,10 @@ public class DownloadService(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Archived.Medium? mediaInfo = archived.ArchivedPostMedia.FirstOrDefault(m => m.id == archivedKVP.Key);
|
OF_DL.Models.Entities.Archived.Medium? mediaInfo =
|
||||||
Archived.List? postInfo =
|
archived.ArchivedPostMedia.FirstOrDefault(m => m.Id == archivedKVP.Key);
|
||||||
archived.ArchivedPostObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
ListItem? postInfo =
|
||||||
|
archived.ArchivedPostObjects.FirstOrDefault(p => p?.Media?.Contains(mediaInfo) == true);
|
||||||
|
|
||||||
isNew = await DownloadArchivedMedia(
|
isNew = await DownloadArchivedMedia(
|
||||||
archivedKVP.Value,
|
archivedKVP.Value,
|
||||||
@ -2546,7 +2557,7 @@ public class DownloadService(
|
|||||||
string.Empty,
|
string.Empty,
|
||||||
postInfo,
|
postInfo,
|
||||||
mediaInfo,
|
mediaInfo,
|
||||||
postInfo?.author,
|
postInfo?.Author,
|
||||||
users);
|
users);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2631,7 +2642,7 @@ public class DownloadService(
|
|||||||
pssh);
|
pssh);
|
||||||
}
|
}
|
||||||
|
|
||||||
Medium? mediaInfo = messages.MessageMedia.FirstOrDefault(m => m.id == messageKVP.Key);
|
Messages.Medium? mediaInfo = messages.MessageMedia.FirstOrDefault(m => m.id == messageKVP.Key);
|
||||||
List? messageInfo =
|
List? messageInfo =
|
||||||
messages.MessageObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
messages.MessageObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
||||||
|
|
||||||
@ -2660,7 +2671,7 @@ public class DownloadService(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Medium? mediaInfo = messages.MessageMedia.FirstOrDefault(m => m.id == messageKVP.Key);
|
Messages.Medium? mediaInfo = messages.MessageMedia.FirstOrDefault(m => m.id == messageKVP.Key);
|
||||||
List? messageInfo = messages.MessageObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
List? messageInfo = messages.MessageObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
||||||
|
|
||||||
isNew = await DownloadMessageMedia(
|
isNew = await DownloadMessageMedia(
|
||||||
@ -2747,7 +2758,8 @@ public class DownloadService(
|
|||||||
$"https://onlyfans.com/api2/v2/users/media/{parsed[4]}/drm/message/{parsed[5]}?type=widevine",
|
$"https://onlyfans.com/api2/v2/users/media/{parsed[4]}/drm/message/{parsed[5]}?type=widevine",
|
||||||
pssh);
|
pssh);
|
||||||
|
|
||||||
Medium? mediaInfo = paidMessageCollection.PaidMessageMedia.FirstOrDefault(m => m.id == kvp.Key);
|
Messages.Medium? mediaInfo =
|
||||||
|
paidMessageCollection.PaidMessageMedia.FirstOrDefault(m => m.id == kvp.Key);
|
||||||
Purchased.List? messageInfo =
|
Purchased.List? messageInfo =
|
||||||
paidMessageCollection.PaidMessageObjects.FirstOrDefault(p =>
|
paidMessageCollection.PaidMessageObjects.FirstOrDefault(p =>
|
||||||
p?.media?.Contains(mediaInfo) == true);
|
p?.media?.Contains(mediaInfo) == true);
|
||||||
@ -2764,7 +2776,8 @@ public class DownloadService(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Medium? mediaInfo = paidMessageCollection.PaidMessageMedia.FirstOrDefault(m => m.id == kvp.Key);
|
Messages.Medium? mediaInfo =
|
||||||
|
paidMessageCollection.PaidMessageMedia.FirstOrDefault(m => m.id == kvp.Key);
|
||||||
Purchased.List? messageInfo =
|
Purchased.List? messageInfo =
|
||||||
paidMessageCollection.PaidMessageObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
paidMessageCollection.PaidMessageObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
||||||
isNew = await DownloadPurchasedMedia(kvp.Value, path, kvp.Key, "Messages", progressReporter,
|
isNew = await DownloadPurchasedMedia(kvp.Value, path, kvp.Key, "Messages", progressReporter,
|
||||||
@ -3020,7 +3033,7 @@ public class DownloadService(
|
|||||||
$"https://onlyfans.com/api2/v2/users/media/{parsed[4]}/drm/post/{parsed[5]}?type=widevine",
|
$"https://onlyfans.com/api2/v2/users/media/{parsed[4]}/drm/post/{parsed[5]}?type=widevine",
|
||||||
pssh);
|
pssh);
|
||||||
|
|
||||||
Medium? mediaInfo = purchasedPosts.PaidPostMedia.FirstOrDefault(m => m.id == postKVP.Key);
|
Messages.Medium? mediaInfo = purchasedPosts.PaidPostMedia.FirstOrDefault(m => m.id == postKVP.Key);
|
||||||
Purchased.List? postInfo =
|
Purchased.List? postInfo =
|
||||||
purchasedPosts.PaidPostObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
purchasedPosts.PaidPostObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
||||||
|
|
||||||
@ -3036,7 +3049,7 @@ public class DownloadService(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Medium? mediaInfo = purchasedPosts.PaidPostMedia.FirstOrDefault(m => m.id == postKVP.Key);
|
Messages.Medium? mediaInfo = purchasedPosts.PaidPostMedia.FirstOrDefault(m => m.id == postKVP.Key);
|
||||||
Purchased.List? postInfo =
|
Purchased.List? postInfo =
|
||||||
purchasedPosts.PaidPostObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
purchasedPosts.PaidPostObjects.FirstOrDefault(p => p?.media?.Contains(mediaInfo) == true);
|
||||||
isNew = await DownloadPurchasedPostMedia(postKVP.Value, path, postKVP.Key, "Posts", progressReporter,
|
isNew = await DownloadPurchasedPostMedia(postKVP.Value, path, postKVP.Key, "Posts", progressReporter,
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using OF_DL.Models;
|
using OF_DL.Models;
|
||||||
using OF_DL.Models.Archived;
|
|
||||||
using OF_DL.Models.Messages;
|
using OF_DL.Models.Messages;
|
||||||
using OF_DL.Models.Post;
|
using OF_DL.Models.Post;
|
||||||
using OF_DL.Models.Purchased;
|
using OF_DL.Models.Purchased;
|
||||||
using OF_DL.Models.Streams;
|
using OF_DL.Models.Streams;
|
||||||
using OF_DL.Enumerations;
|
using OF_DL.Enumerations;
|
||||||
|
using OF_DL.Models.Entities.Archived;
|
||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
|
|
||||||
namespace OF_DL.Services;
|
namespace OF_DL.Services;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
using OF_DL.Models;
|
using OF_DL.Models;
|
||||||
using OF_DL.Models.Archived;
|
using OF_DL.Models.Entities.Archived;
|
||||||
using OF_DL.Models.Messages;
|
using OF_DL.Models.Messages;
|
||||||
using OF_DL.Models.Post;
|
using OF_DL.Models.Post;
|
||||||
using OF_DL.Models.Purchased;
|
using OF_DL.Models.Purchased;
|
||||||
@ -17,13 +17,15 @@ public interface IDownloadService
|
|||||||
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> DownloadArchivedMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, Archived.List? messageInfo,
|
IProgressReporter progressReporter, string? filenameFormat, ListItem? messageInfo,
|
||||||
Archived.Medium? messageMedia, Archived.Author? author, Dictionary<string, long> users);
|
OF_DL.Models.Entities.Archived.Medium? messageMedia, Models.Entities.Common.Author? author,
|
||||||
|
Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadArchivedPostDRMVideo(string policy, string signature, string kvp, string url,
|
Task<bool> DownloadArchivedPostDRMVideo(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, Archived.List? postInfo, Archived.Medium? postMedia,
|
IProgressReporter progressReporter, string? filenameFormat, ListItem? postInfo,
|
||||||
Archived.Author? author, Dictionary<string, long> users);
|
OF_DL.Models.Entities.Archived.Medium? postMedia,
|
||||||
|
Models.Entities.Common.Author? author, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadPostDRMVideo(string policy, string signature, string kvp, string url, string decryptionKey,
|
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 folder, DateTime lastModified, long media_id, string api_type, IProgressReporter progressReporter,
|
||||||
@ -39,11 +41,11 @@ public interface IDownloadService
|
|||||||
|
|
||||||
Task<bool> DownloadMessageDRMVideo(string policy, string signature, string kvp, string url, string decryptionKey,
|
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 folder, DateTime lastModified, long media_id, string api_type, IProgressReporter progressReporter,
|
||||||
string? filenameFormat, List? messageInfo, Medium? messageMedia, Messages.FromUser? fromUser,
|
string? filenameFormat, List? messageInfo, Messages.Medium? messageMedia, Messages.FromUser? fromUser,
|
||||||
Dictionary<string, long> users);
|
Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadMessageMedia(string url, string folder, long media_id, string api_type,
|
Task<bool> DownloadMessageMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, List? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, List? messageInfo, Messages.Medium? messageMedia,
|
||||||
Messages.FromUser? fromUser, Dictionary<string, long> users);
|
Messages.FromUser? fromUser, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadPostMedia(string url, string folder, long media_id, string api_type,
|
Task<bool> DownloadPostMedia(string url, string folder, long media_id, string api_type,
|
||||||
@ -55,30 +57,36 @@ public interface IDownloadService
|
|||||||
SinglePost.Author? author, Dictionary<string, long> users);
|
SinglePost.Author? author, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadPurchasedMedia(string url, string folder, long media_id, string api_type,
|
Task<bool> DownloadPurchasedMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
Purchased.FromUser? fromUser, Dictionary<string, long> users);
|
Purchased.FromUser? fromUser, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadSinglePurchasedMedia(string url, string folder, long media_id, string api_type,
|
Task<bool> DownloadSinglePurchasedMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
FromUser? fromUser, Dictionary<string, long> users);
|
FromUser? fromUser, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadPurchasedMessageDRMVideo(string policy, string signature, string kvp, string url,
|
Task<bool> DownloadPurchasedMessageDRMVideo(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, Purchased.List? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
Purchased.FromUser? fromUser, Dictionary<string, long> users);
|
Purchased.FromUser? fromUser, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadSinglePurchasedMessageDRMVideo(string policy, string signature, string kvp, string url,
|
Task<bool> DownloadSinglePurchasedMessageDRMVideo(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, SingleMessage? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
FromUser? fromUser, Dictionary<string, long> users);
|
FromUser? fromUser, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadPurchasedPostDRMVideo(string policy, string signature, string kvp, string url,
|
Task<bool> DownloadPurchasedPostDRMVideo(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, Purchased.List? postInfo, Medium? postMedia,
|
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? postInfo,
|
||||||
|
Messages.Medium? postMedia,
|
||||||
Purchased.FromUser? fromUser, Dictionary<string, long> users);
|
Purchased.FromUser? fromUser, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadPurchasedPostMedia(string url, string folder, long media_id, string api_type,
|
Task<bool> DownloadPurchasedPostMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, Purchased.List? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
Purchased.FromUser? fromUser, Dictionary<string, long> users);
|
Purchased.FromUser? fromUser, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadStoryMedia(string url, string folder, long media_id, string api_type,
|
Task<bool> DownloadStoryMedia(string url, string folder, long media_id, string api_type,
|
||||||
@ -95,11 +103,13 @@ public interface IDownloadService
|
|||||||
|
|
||||||
Task<bool> DownloadSingleMessagePreviewDRMVideo(string policy, string signature, string kvp, string url,
|
Task<bool> DownloadSingleMessagePreviewDRMVideo(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, SingleMessage? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
FromUser? fromUser, Dictionary<string, long> users);
|
FromUser? fromUser, Dictionary<string, long> users);
|
||||||
|
|
||||||
Task<bool> DownloadMessagePreviewMedia(string url, string folder, long media_id, string api_type,
|
Task<bool> DownloadMessagePreviewMedia(string url, string folder, long media_id, string api_type,
|
||||||
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo, Medium? messageMedia,
|
IProgressReporter progressReporter, string? filenameFormat, SingleMessage? messageInfo,
|
||||||
|
Messages.Medium? messageMedia,
|
||||||
FromUser? fromUser, Dictionary<string, long> users);
|
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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user