!rss read
will assume url if there's only url registered for the channel
This commit is contained in:
parent
cf76cd4991
commit
1478b3bb32
1 changed files with 8 additions and 2 deletions
|
@ -155,10 +155,16 @@ class Module(ModuleManager.BaseModule):
|
||||||
changed = True
|
changed = True
|
||||||
message = "Removed RSS feed"
|
message = "Removed RSS feed"
|
||||||
elif subcommand == "read":
|
elif subcommand == "read":
|
||||||
|
url = None
|
||||||
if not len(event["args_split"]) > 1:
|
if not len(event["args_split"]) > 1:
|
||||||
|
if len(rss_hooks) == 1:
|
||||||
|
url = rss_hooks[0]
|
||||||
|
else:
|
||||||
raise utils.EventError("Please provide a url")
|
raise utils.EventError("Please provide a url")
|
||||||
|
else:
|
||||||
|
url = event["args_split"][1]
|
||||||
|
|
||||||
title, entries = self._get_entries(event["args_split"][1])
|
title, entries = self._get_entries(url)
|
||||||
if not entries:
|
if not entries:
|
||||||
raise utils.EventError("Failed to get RSS entries")
|
raise utils.EventError("Failed to get RSS entries")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue