feat(api): read rss results from indexers #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/indexer-rss"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
PR D of the indexer engine: the
rssresults type.src/indexers/rss.rs: reads a feed with quick-xml's plainReader(no serde, no namespace resolution, so names stay as written:ex:seeders). Each<item>(RSS 2.0 / 1.0) or<entry>(Atom) becomes a small JSON value: an element is its trimmed text (CDATA, predefined entities and character references decoded), or, when it has attributes or children, an object of its children by qualified name,@attrkeys and its own text under#text. Repeated elements: the first one wins. The root must berss,feedorRDF; malformed XML, unclosed elements or another document (an HTML page) is an error.extract::rssruns the existing field reading on each item, so sizes, counts, dates (RFC 2822pubDate), infohash from the field or the magnet, magnet built from infohash + trackers, and the "left out" count all work unchanged.lookuplearns the@attrsegment, and a path leading to an element with attributes reads its#text./api/indexers/checkreports rss indexers like json ones..torrentlinks stay plain links: nothing downloads them, an item needs an infohash or a magnet holding one.Tests
/rss(namespaced infohash, CDATA title,1.4 GiB, RFC 2822 date,.torrentenclosure viaenclosure.@url, an item with only a base32 magnet in<link>, an item with neither),/rss-broken(malformed),/rss-named(the fake catalog's releases as a feed). An rss indexer pointed at an HTML page now fails instead of being skipped.124 tests pass; fmt and clippy clean.
Docs
docs/INDEXERS.md: status line, a complete fictional RSS feed and definition, an "RSS results" section (paths, attributes, decoding, first wins, UTF-8, Atom), new troubleshooting errors. README mentions RSS; ROADMAP phase 7 gets an
rssstep ✅.New dependency
quick-xml = "0.41": already in Cargo.lock through librqbit (librqbit-upnp), same version, so nothing new is downloaded or built. A small, fast, widely used XML pull parser; the plain reader keeps the code short and gives prefixed names as written, which definitions use.🤖 Generated with Claude Code
5d7533f9200bd815ff040bd815ff0446b732d124