Browse Source

Merge pull request #11055 from glassez/rss-api

Allow to refresh RSS item(s) via WebAPI
adaptive-webui-19844
Vladimir Golovnev 5 years ago committed by GitHub
parent
commit
146ef69346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/webui/api/rsscontroller.cpp
  2. 1
      src/webui/api/rsscontroller.h

10
src/webui/api/rsscontroller.cpp

@ -91,6 +91,16 @@ void RSSController::itemsAction()
setResult(jsonVal.toObject()); setResult(jsonVal.toObject());
} }
void RSSController::refreshItemAction()
{
checkParams({"itemPath"});
const QString itemPath {params()["itemPath"]};
RSS::Item *item = RSS::Session::instance()->itemByPath(itemPath);
if (item)
item->refresh();
}
void RSSController::setRuleAction() void RSSController::setRuleAction()
{ {
checkParams({"ruleName", "ruleDef"}); checkParams({"ruleName", "ruleDef"});

1
src/webui/api/rsscontroller.h

@ -44,6 +44,7 @@ private slots:
void removeItemAction(); void removeItemAction();
void moveItemAction(); void moveItemAction();
void itemsAction(); void itemsAction();
void refreshItemAction();
void setRuleAction(); void setRuleAction();
void renameRuleAction(); void renameRuleAction();
void removeRuleAction(); void removeRuleAction();

Loading…
Cancel
Save