2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Update API scheme to layer 160.

This commit is contained in:
John Preston
2023-05-01 10:44:57 +04:00
parent 918af601cf
commit 429a3da3e5
11 changed files with 83 additions and 21 deletions

View File

@@ -918,7 +918,12 @@ void FileLoadTask::process(Args &&args) {
if (video->supportsStreaming) {
flags |= MTPDdocumentAttributeVideo::Flag::f_supports_streaming;
}
attributes.push_back(MTP_documentAttributeVideo(MTP_flags(flags), MTP_int(video->duration), MTP_int(coverWidth), MTP_int(coverHeight)));
attributes.push_back(MTP_documentAttributeVideo(
MTP_flags(flags),
MTP_int(video->duration),
MTP_int(coverWidth),
MTP_int(coverHeight),
MTPint())); // preload_prefix_size
if (args.generateGoodThumbnail) {
goodThumbnail = video->thumbnail;

View File

@@ -192,7 +192,12 @@ DocumentData *Document::readFromStreamHelper(
if (type == RoundVideoDocument) {
flags |= MTPDdocumentAttributeVideo::Flag::f_round_message;
}
attributes.push_back(MTP_documentAttributeVideo(MTP_flags(flags), MTP_int(duration), MTP_int(width), MTP_int(height)));
attributes.push_back(MTP_documentAttributeVideo(
MTP_flags(flags),
MTP_int(duration),
MTP_int(width),
MTP_int(height),
MTPint())); // preload_prefix_size
} else {
attributes.push_back(MTP_documentAttributeImageSize(MTP_int(width), MTP_int(height)));
}