2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

API scheme updated to layer 66.

Support CDN file download.
This commit is contained in:
John Preston
2017-03-23 19:11:35 +03:00
parent 7dd24a30b5
commit 8d28d0691f
26 changed files with 873 additions and 418 deletions

View File

@@ -458,7 +458,8 @@ void FileLoadTask::process() {
if (video->isGifv) {
attributes.push_back(MTP_documentAttributeAnimated());
}
attributes.push_back(MTP_documentAttributeVideo(MTP_int(video->duration), MTP_int(coverWidth), MTP_int(coverHeight)));
auto flags = MTPDdocumentAttributeVideo::Flags(0);
attributes.push_back(MTP_documentAttributeVideo(MTP_flags(flags), MTP_int(video->duration), MTP_int(coverWidth), MTP_int(coverHeight)));
auto cover = (coverWidth > 90 || coverHeight > 90)
? video->thumbnail.scaled(90, 90, Qt::KeepAspectRatio, Qt::SmoothTransformation)