Wallabag: allow filtering download to starred articles (#14051)
Some checks failed
macos / macOS 13 x86-64 🔨15.2 🎯10.15 (push) Has been cancelled
macos / macOS 14 ARM64 🔨15.4 🎯11.0 (push) Has been cancelled

This commit is contained in:
fkaduk
2025-07-13 13:15:22 +02:00
committed by GitHub
parent c4c95a0e90
commit 9b07f943f5

View File

@@ -88,6 +88,7 @@ function Wallabag:init()
-- These settings do have defaults
self.filter_tag = self.wb_settings.data.wallabag.filter_tag or ""
self.filter_starred = self.wb_settings.data.wallabag.filter_starred or false
self.ignore_tags = self.wb_settings.data.wallabag.ignore_tags or ""
self.auto_tags = self.wb_settings.data.wallabag.auto_tags or ""
self.archive_finished = self.wb_settings.data.wallabag.archive_finished or true
@@ -260,6 +261,17 @@ function Wallabag:addToMainMenu(menu_items)
)
end,
},
{
text = _("Only download starred articles"),
keep_menu_open = true,
checked_func = function()
return self.filter_starred or false
end,
callback = function()
self.filter_starred = not self.filter_starred
self:saveSettings()
end,
},
{
text = _("Prefer original non-HTML document"),
keep_menu_open = true,
@@ -616,6 +628,10 @@ function Wallabag:getArticleList()
filtering = "&tags=" .. self.filter_tag
end
if self.filter_starred then
filtering = filtering .. "&starred=1"
end
local article_list = {}
local page = 1
@@ -1593,6 +1609,7 @@ function Wallabag:saveSettings()
password = self.password,
directory = self.directory,
filter_tag = self.filter_tag,
filter_starred = self.filter_starred,
ignore_tags = self.ignore_tags,
auto_tags = self.auto_tags,
archive_finished = self.archive_finished,