RSS-Bridge / rss-bridge

The RSS feed for websites missing it
https://rss-bridge.org/bridge01/
The Unlicense
6.99k stars 1.02k forks source link

[FDroidRepoBridge] Simplify json retrieval #4063

Closed Mynacol closed 2 months ago

Mynacol commented 2 months ago

I looked into avoiding the writing-to-file and then reading-from-file altogether. Using a special file path that leaves the data in memory probably wouldn't work. But I'm unsure why we use the index-v1.jar file altogether. The main F-Droid repo lists not only index-v1.jar (which only makes sense if we were to use the contained signature, which we don't), but also index-v1.json and index-v2.json. These json files can be fetched with getContents, optionally cached, and directly fed into Json::decode without using a temporary file. The HTTP transfer encoding can compress the file to a similar degree the jar (=zip) can. That's exactly what this commit uses.

Now the question is whether all the F-Droid repositories out there have this file. I went through the whole list of known repositories and only one repo misses the index-v1.json file: Bromite. Under these circumstances we can depend on the availability of the index-v1.json file.

Closes #4062

github-actions[bot] commented 2 months ago

Pull request artifacts

Bridge Context Status
FDroidRepo 1 Latest Updates (current) Bridge returned error 404! (19818)
Type: HttpException
Message: https://srv.tt-rss.org/fdroid/repo/index-v1.jar resulted in 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
⚠️ WARNING Trying to access array offset on value of type null at bridges/FDroidRepoBridge.php line 208
FDroidRepo 1 Latest Updates (pr) Bridge returned error 404! (19818)
Type: HttpException
Message: https://srv.tt-rss.org/fdroid/repo/index-v1.json resulted in 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
⚠️ WARNING Trying to access array offset on value of type null at bridges/FDroidRepoBridge.php line 179
FDroidRepo 2 Follow Package (current) Bridge returned error 404! (19818)
Type: HttpException
Message: https://srv.tt-rss.org/fdroid/repo/index-v1.jar resulted in 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
⚠️ WARNING Trying to access array offset on value of type null at bridges/FDroidRepoBridge.php line 208
FDroidRepo 2 Follow Package (pr) Bridge returned error 404! (19818)
Type: HttpException
Message: https://srv.tt-rss.org/fdroid/repo/index-v1.json resulted in 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
⚠️ WARNING Trying to access array offset on value of type null at bridges/FDroidRepoBridge.php line 179

last change: Friday 2024-04-05 09:37:09