Skip to content

Commit

Permalink
Merge pull request #11067 from glassez/rss-api
Browse files Browse the repository at this point in the history
Allow to refresh RSS item(s) via WebAPI
  • Loading branch information
glassez authored Aug 13, 2019
2 parents 05a82af + 40cf020 commit e98f44a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/webui/api/rsscontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ void RSSController::itemsAction()
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()
{
checkParams({"ruleName", "ruleDef"});
Expand Down
1 change: 1 addition & 0 deletions src/webui/api/rsscontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private slots:
void removeItemAction();
void moveItemAction();
void itemsAction();
void refreshItemAction();
void setRuleAction();
void renameRuleAction();
void removeRuleAction();
Expand Down

0 comments on commit e98f44a

Please sign in to comment.