aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2023-07-29 13:06:01 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2023-07-29 13:06:01 +0000
commitd647ebb3adc73e0fb2b81b8661bab94fbace8520 (patch)
tree4b93c458e708a79e20213160034831b19de3c650
parent6e0ea8d6c871bd79e80b87de6cc88ea1cc5e6118 (diff)
downloadtagrss-d647ebb3adc73e0fb2b81b8661bab94fbace8520.tar
tagrss-d647ebb3adc73e0fb2b81b8661bab94fbace8520.tar.gz
tagrss-d647ebb3adc73e0fb2b81b8661bab94fbace8520.zip
Fix bugs related to filtering
-rw-r--r--README.md2
-rwxr-xr-xserve.py2
-rw-r--r--views/index.tpl4
-rw-r--r--views/list_feeds.tpl2
4 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 2fe658a..96c5c2f 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ This project is not in a finished state, but the core functionality is present.
TagRSS is copyright (c) 2023-present Arjun Satarkar \<me@arjunsatarkar.net\>.
-TagRSS is licensed under the GNU Affero General Public License v3.0, which requires among other things that "[w]hen a modified version is used to provide a service over a network, the complete source code of the modified version must be made available."[^1]
+TagRSS is licensed under the GNU Affero General Public License v3.0, which requires among other things that "\[w\]hen a modified version is used to provide a service over a network, the complete source code of the modified version must be made available."[^1]
See `LICENSE.txt` in the root of this repository for the text of the license.
diff --git a/serve.py b/serve.py
index be650a7..e7558a9 100755
--- a/serve.py
+++ b/serve.py
@@ -83,7 +83,7 @@ def index():
if included_tags_str:
included_tags = parse_space_separated_tags(included_tags_str)
with core_lock:
- total_pages: int = max(1, math.ceil(core.get_entry_count(included_feeds=included_feeds) / per_page))
+ total_pages: int = max(1, math.ceil(core.get_entry_count(included_feeds=included_feeds, included_tags=included_tags) / per_page))
entries = core.get_entries(limit=per_page, offset=offset, included_feeds=included_feeds, included_tags=included_tags)
return bottle.template(
"index",
diff --git a/views/index.tpl b/views/index.tpl
index 52e997f..fd26295 100644
--- a/views/index.tpl
+++ b/views/index.tpl
@@ -62,7 +62,7 @@
</div>
<div class="side-by-side-help-container">
<label>Included tags:
- <input type="text" name="included_tags" value="{{included_tags_str}}">
+ <input type="text" name="included_tags" value="{{included_tags_str if included_tags_str else ''}}">
</label>
% include("tag_hover_help.tpl")
</div>
@@ -138,7 +138,7 @@
<input type="text" name="included_feeds" value="{{included_feeds_str}}" style="display: none;">
% end
% if included_tags:
- <input type="text" name="included_feeds" value="{{included_tags_str}}" style="display: none;">
+ <input type="text" name="included_tags" value="{{included_tags_str}}" style="display: none;">
% end
</form>
% include("footer.tpl")
diff --git a/views/list_feeds.tpl b/views/list_feeds.tpl
index 3c60f06..d780789 100644
--- a/views/list_feeds.tpl
+++ b/views/list_feeds.tpl
@@ -42,4 +42,4 @@
</form>
% include("footer.tpl")
</body>
-</html> \ No newline at end of file
+</html>