summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-10-27 10:50:03 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-10-27 10:50:03 +0000
commit09cebd3613dbad8559060a661a7918c2fd86961d (patch)
treece250f5490af023f26aaa88afe49cdbfead43808 /protocols/VKontakte/src
parent9cc7d99f174805bc965f5bc6d0ba09e592515b80 (diff)
VKontakte: fix for audio attachments url
git-svn-id: http://svn.miranda-ng.org/main/trunk@10878 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 191be83f70..d55b9be3db 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -1341,13 +1341,12 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments)
else if (!lstrcmp(ptszType, _T("audio"))) {
JSONNODE *pAudio = json_get(pAttach, "audio");
if (pAudio == NULL) continue;
-
- int aid = json_as_int(json_get(pAudio, "id"));
- int ownerID = json_as_int(json_get(pAudio, "owner_id"));
+
ptrT ptszArtist(json_as_string(json_get(pAudio, "artist")));
ptrT ptszTitle(json_as_string(json_get(pAudio, "title")));
- res.AppendFormat(_T("%s: (%s - %s) - http://vk.com/audio%d_%d"),
- TranslateT("Audio"), ptszArtist, ptszTitle, ownerID, aid);
+ ptrT ptszUrl(json_as_string(json_get(pAudio, "url")));
+ res.AppendFormat(_T("%s: (%s - %s) - %s"),
+ TranslateT("Audio"), ptszArtist, ptszTitle, ptszUrl);
}
else if (!lstrcmp(ptszType, _T("video"))) {
JSONNODE *pVideo = json_get(pAttach, "video");