summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index adfc14411d..d24b9f500e 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -1188,16 +1188,20 @@ CMStringW CVkProto::GetVkPhotoForVideoItem(const JSONNode& Images, MCONTACT hCon
int iMaxSize = 0;
for (auto& it : Images) {
- int iSize = it["width"].as_int();
+ int iSize = it["height"].as_int();
if (iMaxSize < iSize)
wszRes = it["url"].as_mstring();
- if (iMaxSize > 300)
+ if (iMaxSize > 240)
break;
}
+
+
wszRes = GetVkFileItem(wszRes, hContact, iMessageId);
- return wszRes.IsEmpty() ? wszRes : SetBBCString(wszRes, bbcAdvanced, vkbbcImg, wszRes);
+ CMStringW wszPreview(FORMAT, L"%s height=%d", wszRes.c_str(), 240);
+
+ return wszRes.IsEmpty() ? wszRes : SetBBCString(TranslateT("Video"), bbcAdvanced, vkbbcImgE, wszPreview);
}