diff options
author | cedricbonhomme <devnull@localhost> | 2011-06-13 14:36:23 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2011-06-13 14:36:23 +0200 |
commit | 6239b1aaf790ed18138f41b49f0577b31a59ce31 (patch) | |
tree | 2b0c00f4b19f25e02cc44871b6d14f243d209062 | |
parent | Minor bugfix: in loaf_feed() function (number of articles to load per feed). (diff) | |
download | newspipe-6239b1aaf790ed18138f41b49f0577b31a59ce31.tar.gz newspipe-6239b1aaf790ed18138f41b49f0577b31a59ce31.tar.bz2 newspipe-6239b1aaf790ed18138f41b49f0577b31a59ce31.zip |
Minor improvement: test the number of articles per feed to import.
-rwxr-xr-x | pyAggr3g470r.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 80145da3..6f543523 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -288,7 +288,7 @@ class Root: html += '<form method=get action="/set_max_articles/">\n' html += "For each feed only load the " - html += """<input type="number" name="max_nb_articles" value="%s" min="5" max="5000" step="1" size="2">\n""" % (max_nb_articles) + html += """<input type="number" name="max_nb_articles" value="%s" min="1" step="1" size="2">\n""" % (max_nb_articles) html += " last articles." if utils.MAX_NB_ARTICLES == -1: html += "<br />All articles are currently loaded.\n" @@ -1106,9 +1106,11 @@ class Root: change_feed_url.exposed = True - def set_max_articles(self, max_nb_articles=0): + def set_max_articles(self, max_nb_articles=1): """ """ + if max_nb_articles < -1 or max_nb_articles == 0: + max_nb_articles = 1 utils.MAX_NB_ARTICLES = int(max_nb_articles) self.update() return self.management() |