From 65b18d6e938fccdca0ca66513e7855ebbf296897 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 5 Aug 2014 16:16:53 +0000 Subject: fixed #743 git-svn-id: http://svn.miranda-ng.org/main/trunk@10076 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewsAggregator/Src/CheckFeed.cpp | 10 +++++++++- plugins/NewsAggregator/Src/Utils.cpp | 8 ++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index 16dac94943..462e8d8728 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -163,6 +163,13 @@ VOID CheckCurrentFeed(MCONTACT hContact) mir_free(string); continue; } + if (!lstrcmpi(xi.getName(child), _T("copyright")) && xi.getText(child)) { + TCHAR *string = mir_tstrdup(xi.getText(child)); + ClearText(string); + db_set_s(hContact, "UserInfo", "MyNotes", _T2A(string)); + mir_free(string); + continue; + } if (!lstrcmpi(xi.getName(child), _T("image"))) { for (int x = 0; x < xi.getChildCount(child); x++) { HXML imageval = xi.getChild(child, x); @@ -210,6 +217,7 @@ VOID CheckCurrentFeed(MCONTACT hContact) TCHAR *title = NULL, *link = NULL, *datetime = NULL, *descr = NULL, *author = NULL, *comments = NULL, *guid = NULL, *category = NULL; for (int z = 0; z < xi.getChildCount(child); z++) { HXML itemval = xi.getChild(child, z); + TCHAR *tmp = (TCHAR*)xi.getName(itemval); if (!lstrcmpi(xi.getName(itemval), _T("title"))) { TCHAR *string = mir_tstrdup(xi.getText(itemval)); ClearText(string); @@ -231,7 +239,7 @@ VOID CheckCurrentFeed(MCONTACT hContact) else if (!lstrcmpi(xi.getName(itemval), _T("dc:date"))) { datetime = (TCHAR *)xi.getText(itemval); } - else if (!lstrcmpi(xi.getName(itemval), _T("description"))) { + else if (!lstrcmpi(xi.getName(itemval), _T("description")) || !lstrcmpi(xi.getName(itemval), _T("encoded"))) { TCHAR *string = mir_tstrdup(xi.getText(itemval)); ClearText(string); descr = mir_tstrdup(string); diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 3ac7545883..662841a2cb 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -210,7 +210,7 @@ time_t __stdcall DateToUnixTime(TCHAR *stamp, BOOL FeedType) TCHAR weekday[4], monthstr[4], timezonesign[2]; INT day, month, year, hour, min, sec, timezoneh, timezonem; if (_tcsstr(p, _T(","))) { - _stscanf( p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); + _stscanf(p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); if (!lstrcmpi(monthstr, _T("Jan"))) month = 1; if (!lstrcmpi(monthstr, _T("Feb"))) @@ -244,9 +244,13 @@ time_t __stdcall DateToUnixTime(TCHAR *stamp, BOOL FeedType) else mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec); } + else if (_tcsstr(p, _T("T"))) { + _stscanf(p, _T("%d-%d-%dT%d:%d:%d"), &year, &month, &day, &hour, &min, &sec); + mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec); + } else { - _stscanf( p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); + _stscanf(p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); if (!lstrcmp(timezonesign, _T("+"))) mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec); else if (!lstrcmp(timezonesign, _T("-"))) -- cgit v1.2.3