diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-17 03:57:20 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-17 03:57:20 +0000 |
commit | 06b7222a8359baa84e2dc185f4397a2fbb40ff58 (patch) | |
tree | 311012311eca75a8261d3dde6f4f75937fca2078 /protocols/VKontakte/src/misc.cpp | |
parent | d8b8caf0bfcc4fde668b6011e1f0c8eeac3d6108 (diff) |
VKontakte:
add ‘Shorten links for audio attachments’ option
version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@14226 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index b92c72c83d..79ab9356e8 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -989,6 +989,10 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszAudio;
tszAudio.AppendFormat(_T("%s - %s"), tszArtist, tszTitle);
+ int iParamPos = tszUrl.Find(_T("?"));
+ if (m_bShortenLinksForAudio && iParamPos != -1)
+ tszUrl = tszUrl.Left(iParamPos);
+
res.AppendFormat(_T("%s: %s"),
SetBBCString(TranslateT("Audio"), iBBC, vkbbcB),
SetBBCString(tszAudio, iBBC, vkbbcUrl, tszUrl));
|