[plugin] NewsDownloader: use first feed description if it's a table in RSS (#13032)
Some checks are pending
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (10.15, 13, x86-64, 15.2) (push) Waiting to run
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (11.0, 14, ARM64, 15.4) (push) Waiting to run

Similar to the logic for Atom in #12959.

Reported in https://github.com/koreader/koreader/issues/12953#issuecomment-2580784621

Sample feed https://www.engadget.com/rss.xml
This commit is contained in:
Frans de Jonge
2025-01-09 19:10:15 +01:00
committed by GitHub
parent 5bd3f3b42c
commit 274dd6dab3

View File

@@ -523,7 +523,7 @@ function NewsDownloader:processFeed(feed_type, feeds, cookies, limit, download_f
local feed_description
if feed_type == FEED_TYPE_RSS then
feed_title = feed.title
feed_description = feed.description
feed_description = feed.description[1] or feed.description --- @todo This should select the one with type="html" if there is a choice.
if feed["content:encoded"] ~= nil then
-- Spec: https://web.resource.org/rss/1.0/modules/content/
feed_description = feed["content:encoded"]