mirror of
https://github.com/martinrotter/rssguard.git
synced 2024-12-31 18:37:30 +01:00
Fixed #171.
This commit is contained in:
parent
dc0dd28f12
commit
9a9027f4b7
@ -13,6 +13,7 @@ Added:
|
||||
|
||||
Fixed:
|
||||
|
||||
▪ Now title of the RSS/ATOM message is taken into account when deciding message "uniqueness". (bug #171)
|
||||
▪ MySQL scripts improved. (bug #170)
|
||||
▪ Fixed little problem with feed list hiding. (bug #163)
|
||||
▪ Web browser search context menu item now trims the searched string. (bug #168)
|
||||
|
@ -242,6 +242,11 @@ QList<Message> ParsingFactory::parseAsRSS20(const QString &data) {
|
||||
new_message.m_url = new_message.m_enclosures.first().m_url;
|
||||
}
|
||||
|
||||
if (new_message.m_url.isEmpty()) {
|
||||
// Try to get "href" attribute.
|
||||
new_message.m_url = message_item.namedItem(QSL("link")).toElement().attribute(QSL("href"));
|
||||
}
|
||||
|
||||
new_message.m_author = message_item.namedItem(QSL("author")).toElement().text();
|
||||
|
||||
if (new_message.m_author.isEmpty()) {
|
||||
|
@ -192,7 +192,7 @@ int Feed::updateMessages(const QList<Message> &messages) {
|
||||
// 3) they have same AUTHOR.
|
||||
query_select_with_url.setForwardOnly(true);
|
||||
query_select_with_url.prepare("SELECT id, date_created, is_read, is_important FROM Messages "
|
||||
"WHERE feed = :feed AND url = :url AND author = :author AND account_id = :account_id;");
|
||||
"WHERE feed = :feed AND title = :title AND url = :url AND author = :author AND account_id = :account_id;");
|
||||
|
||||
// When we have custom ID of the message, we can check directly for existence
|
||||
// of that particular message.
|
||||
@ -242,6 +242,7 @@ int Feed::updateMessages(const QList<Message> &messages) {
|
||||
// We need to recognize existing messages according URL & AUTHOR.
|
||||
// NOTE: This concerns messages from standard account.
|
||||
query_select_with_url.bindValue(QSL(":feed"), custom_id);
|
||||
query_select_with_url.bindValue(QSL(":title"), message.m_title);
|
||||
query_select_with_url.bindValue(QSL(":url"), message.m_url);
|
||||
query_select_with_url.bindValue(QSL(":author"), message.m_author);
|
||||
query_select_with_url.bindValue(QSL(":account_id"), account_id);
|
||||
@ -293,7 +294,7 @@ int Feed::updateMessages(const QList<Message> &messages) {
|
||||
|
||||
anything_updated = true;
|
||||
|
||||
if (query_update.exec()) {
|
||||
if (query_update.exec() && !message.m_isRead) {
|
||||
updated_messages++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user